Hi@akhtar,
Ansible has the assemble module. This module can assemble files from a directory and merged the files in a single file as shown below.
- name: Assemble from fragments from a directory
assemble:
src: /etc/someapp/fragments
dest: /etc/someapp/someapp.conf