I have a file called a.txt which has following contents:
123
456
986
231
456
And I have another file in the /etc/file2.txt and has below content:
test values
some values
hello world how are you
And I want to copy the content of file a.txt to /etc/file2.txt, so I did this:
- name: Copy from a.txt to file2.txt
copy:
src: "a.txt"
dest: "/etc/file2.txt"
But this Overrides and replaces the whole contents in the file2.txt
But I want it to be like this:
test values
some values
hello world how are you
123
456
986
231
456
Can someone give me a help?