Command line with pipes

`
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 will need to use the shell module instead of command.