Hello all,
I am new to ansible, trying to learn the basis so I can use it to automate some of my networking stuffs. I currently have setup a small lab with for Ubuntu and 2 CentOS systems. Anything I do on the Ubuntu works fine be the CentOS is always given me issues. I have pretty setup everything regarding connectivity but below is the error I get with one of the CentOS system when running an ad-hoc command to test ping.
!
}
10.18.13.17 | FAILED! => {
“changed”: false,
“module_stderr”: “Shared connection to 10.18.13.17 closed.\r\n”,
“module_stdout”: “/bin/sh: /usr/bin/python: No such file or directory\r\n”,
“msg”: “The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error”,
“rc”: 127
}
This is the version of CentOS that I am running on the remote server
!
NAME=“CentOS Stream”
VERSION=“8”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“8”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“CentOS Stream 8”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:centos:centos:8”
HOME_URL=“https://centos.org/”
BUG_REPORT_URL=“https://bugzilla.redhat.com/”
REDHAT_SUPPORT_PRODUCT=“Red Hat Enterprise Linux 8”
REDHAT_SUPPORT_PRODUCT_VERSION=“CentOS Stream”
!
This is also the version of ansible and python I am running on both remote server and ansible control host
!
remote host
Python 3.6.8
ansible-control-host
ansible 2.7.7
config file = /home/user/ansible_training/ansible.cfg
configured module search path = [‘/home/user/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]
!
Can anybody help me with this error ?
Thank you.