migrating this thread from ansible project
https://groups.google.com/forum/#!topic/ansible-project/R4qQQZmErXA
Michael said:
The “file exists” stuff should be handled by “execute module” rather than calling low level shell ops and defining “remote path exists”, just call the stat module.
OK. I initially did the low level stuff because I thought you wanted script: to fully run without invoking python modules.
I modified the patch now using _execute_module stat :
https://github.com/ansible/ansible/pull/4986
Jerome