Issue with Wordpress Update playbook

9 views
Skip to first unread message

Arush Salil

unread,
May 26, 2016, 12:24:12 PM5/26/16
to Ansible Project
I am writing a playbook to check for wordpress updates using wp-cli.

The issues that I am facing are as below:

  • I am unable to figure out how to iterate in "/var/www/*/htdocs"
  • How can I get the output of wp-cli for each host in a more human readable/formatted form? Currently I am getting the output by using debug.
Any help would be greatly appreciated. Thank you

Johannes Kastl

unread,
May 26, 2016, 4:12:41 PM5/26/16
to ansible...@googlegroups.com
On 26.05.16 14:15 Arush Salil wrote:
> The issues that I am facing are as below:
>
>
> - I am unable to figure out how to iterate in "/var/www/*/htdocs"

At first thought I would use a shell task that does a ls -1 (thats a
one, not the letter L) on the /var/www/ directory. Register the output
of that in a variable foobar, and you could iterate over
foobar.stdout_lines somehow (not sure about the exact syntax)


> - How can I get the output of wp-cli for each host in a more human
> readable/formatted form? Currently I am getting the output by using debug.

I would not got for human readable, but rather let ansible look for
some string in the output. And do the update or do not do it,
depending on the existence of the string in the output.

Johannes


signature.asc
Reply all
Reply to author
Forward
0 new messages