On 23.04.16 23:18 Kai Stian Olstad wrote:

> This is not tested, but should work:
> 
> ansible 'host1' -m shell -a "for database in \$(psql -l | grep '^ db' | 
> awk '{print \$1}'); do psql -c \"\dx \$database\"; done"

When I read the OP I was not sure, if the problem are the quotes or
the backslash inside before the dx, that has to be escaped...

Johannes

-- 
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/571CCBE4.7080201%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to