up vote0down votefavorite
<http://stackoverflow.com/questions/39037046/parsing-ansible-output-with-linux-tools/39037249#>
I have a silly playbook which just runs a command to get the list of vhost
in every host on webserver group. As all vhost are located in /var/www is
easy to get the list of webs.
The problem is the way of Ansible returns the info. For example:
ok: [host1] => {
"var": {
"out.stdout_lines": [
"",
"host1.com"
]
}
}
ok: [host2] => {
"var": {
"out.stdout_lines": [
"",
"host2.com"
]
}
}
Do you know an easy way to just get the name of the vhosts? Using grep awk
or something like that?
--
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/ba542c0b-5227-4caa-bfb5-21900f2d433b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.