You need to create your own customized scripts. According to your use case, the below playbook may help you.
- hosts: localhost
- name: Assemble from fragments from a directory
- name: Find uniqe entries
shell: cat Mergedfile | sort -u | uniq -u > hosts