I am unable to figure out anymore on this as there's no way that I know of to get a "real" error message out of ansible. I run the below
$ ansible -i /opt/ansible/ec2.py "tag_Function_app:&tag_Application_pro:&tag_Environment_pqa" --private-key=~/.ssh/id_root_rsa -m shell --sudo -a "service httpd restart" -u root
But end up with a very nondescript error
10.221.142.0 | FAILED | rc=0 >>
MODULE FAILURE
What is exactly going on? Is there a way for me to further debug this? Trying to ssh strictly with the user / sshkey works fine?
Best Answer
This error also occurs when Python 2.x is not installed in
/usr/bin/python
. E.g. on Ubuntu 16.04 you have to install it:See also the ansible docs.