I need to merge two files without duplicate entries in it. is there any way i can achieve it through ansible modules. Ex i have two files /etc/hosts1 and /etc/hosts2. I need to have one /etc/hosts file with all entries present in both /etc/hosts1 and /etc/hosts2 without duplicate entries. How can i achieve this. An example would be appreciated
- name: Merge two files
assemble:
src: /etc/hosts1
dest: /etc/hosts2
The above assemble module fails