On Sat, Dec 08, 2018 at 01:30:00PM +0000, Andy Smith wrote:
> Probably I missed some really simple way to just concat a bunch of
> files together and send that over. Is there something like that?
Typical, as soon as I ask the question I find a way to do it:
- name: Rebuild foobar file
when: foo_changed.changed or bar_changed.changed
no_log: true
copy:
content: "{{ lookup('file', '/etc/things/' + thing_name + '/foo') + '\n' + lookup('file', '/etc/things/' + thing_name + '/bar') + '\n' }}"
dest: /etc/things/{{ thing_name }}/foobar
mode: 0640
Is that the best way?
Thanks,
Andy