Hi All,
I have a simple ansible script that is trying to gather info using the
setup module and copying that information onto a temp file. Here is what my
script looks like:
- hosts: all
tasks:
- name: gather info
setup:
register: info
- name: copy info
copy: content="{{ info }}" dest=/tmp/info_test.log
When I run this script, I get the following error:
fatal: [localhost] => error parsing argument string 'content="{ .........
.............................
// Json formatted information registered in the
info variable
......}} "
dest=/tmp/info_test.log', try quoting the entire line.
Is there any other way of capturing the info produced by setup module, and
store it in a file?
Also does this seems to be a bug in the copy module? I feel this is failing
because the json output is not formatted correctly.
Any help is appreciated.
--
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/a26e3d21-75d2-41c8-b513-a3bd86f0c839%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.