You will need to use the shell module instead of command.

On Friday, January 30, 2015, Roman Dolgov <[email protected]> wrote:

>  tasks:
>    - name: get clusters names
>      command: "ps axu | grep bin/post | egrep -o etc/postgresql/9.3/.* |
> awk -F '/' '{print $4}'"
>
>
>
> That command doesn't work in ansible-playbook,  but works fine in shell, I
> got error about wrong arguments of ps tool.
> How I could use pipes with ansible command ?
>
> --
> 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]
> <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a4780854-8391-4e34-a2e9-6e6ec6b5351a%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/a4780854-8391-4e34-a2e9-6e6ec6b5351a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v_eou1HvgmW%2BJg9MLHierkHSyCnjv-FXVLLFSijdFot3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to