Hi,
I am a newbie in this wonderful tool Ansible.
I made a playbook script to test it.
But I found that sometimes I need to parse the stdout of each task.
For instance
- name : run and get the result in JSON format on stdout
shell : "/usr/local/something"
register : result
Let's see result.stdout
{u'name':u'test1', u'ipaddress':'xxx.xxx.xxx.xx', u'pass':'asdfasfd'}
Can I extract these three elements(name, ipaddress, pass) from stdout and
use it on another task?
I think lot of users experienced this issue because the return
values(stdout) of tools are not simple sometimes
Even if I have a plan to make another Module I think it's tough because I
should pass the three elements.
(Unfortunately I am not good at Python yet)
Thanks in advance!
-Justin
--
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/0fff3282-8c63-41e2-83d5-297df7f85642%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.