I have a playbook that runs with no errors in my local tests VM (CentOS7) but when I run this same playbook on the prod servers (RHEL7).
I run below command
sudo ansible-playbook passwords.yml -e
and I keep getting the below error:
'ansible_python_interpreter=/usr/bin/python3' -i irm-inventory -bK
BECOME password:
PLAY [Adjust password settings] ******************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************
fatal: [SERVERNAME]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"setup": {"failed": true, "module_stderr":
"Shared connection to SERVER_IP closed.\r\n", "module_stdout": "\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc":
1}}, "msg": "The following modules failed to execute: setup\n"}
**************************************************************************************************************************************
SERVERNAME : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
What are possible causes for this issue? I already tried with python2 and python3
subscription-manager repos --enable rhel-7-server-ansible-2.9-rpms
, or better, userhel-7-server-ansible-2-rpms
so you will always be on the latest version.