On 02.08.2018 00:08, John Harmon wrote:
On Wednesday, August 1, 2018 at 3:46:41 PM UTC-6, John Harmon wrote:
Thanks Matt. I tried the '| quote' and it did not crash this time. I
will look into the template module.
I couldn't get it to write it with the template module.... but I was
able
to write it fine with lineinfile
In your shell task you append to the file, but if replacing the file
every time you run ansible-playbook is OK, this should work
- name: Write results
copy:
content: '{{ commands.stdout_lines | to_nice_json }}'
dest: /tmp/dba_commands.txt
delegate_to: localhost
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6aebd3c31e9d0533bfcb4b5a377fd9ae%40olstad.com.
For more options, visit https://groups.google.com/d/optout.