Hello, I have a number of templates that are generated by Ansible but I need them combined into a single file. Is there a way to do this without having to do a shell command "file1 >> newFile.txt"
For example I have 4 files and I need to merge the content from these 4 source files to a single destination file.
File1 > dest.txt
File2 >> dest.txt
File3 >> dest.txt
File4 >> dest.txt
In my case these 4 files were generated by Ansible Templates. Since I have a vars file that is a data dictionary it creates multiple files. From these multiple files I need to merge them into a single file. I looked at lineinfile but I'm not saving a single line but 50 - 100 lines.
Is there a better way to do this other than using shell commands?