I've run into this too.
My workaround is to use the script module instead of the shell module. Then you don't have to fight with Ansible about quotes.
Added benefit: you can put your script under Version Control.
ansible host1 -m script -a example.sh
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/97962ea8-9fd7-49c0-b3f8-c230c4e1670a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.