I have two list of dicts:
member_added:
pool1:
- name: 10.99.99.101:80
- name: 10.99.99.102:80
pool2:
- name: 10.98.98.101:80
member_updated:
pool1:
- name: 10.99.99.99:80
status: present
- name: 10.99.99.101:80
status: present
- name: 10.99.99.102:80
status: present
pool2:
- name: 10.98.98.99:80
status: present
- name: 10.98.98.101:80
status: present
I need to remove duplicate members from member_updated
End result should be
member_updated_without_duplicates:
pool1:
- name: 10.99.99.99:80
status: present
pool2:
- name: 10.98.98.99:80
status: present
I can imagine how to do it in Python, bus Ansible less flexible in data manipulation.
Does anybody have idea how remove those duplicates?