A common issue is that the short form of calling the command and shell modules introduces an additional layer of parsing. It is significantly more robust to use the cmd argument, e.g instead of:
- command: echo hello world
you should write
- command:
cmd: echo hello world
It’s slightly more typing, but avoids quite a bit of weirdness.