[root@centos7 ansible]# ansible test_192.168.190.230 -m yum -a "name=tcsh state=present"
test_192.168.190.230 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"cmd": "dnf install -y python2-dnf",
"msg": "Could not import the dnf python module using /usr/bin/python (2.7.18 (default, Jun 23 2021, 16:28:12) [GCC 7.3.0]). Please install `python2-dnf` package or ensure you have specified the correct ansible_python_interpreter.",
"rc": 1,
"results": [],
"stderr": "Error: Unable to find a match: python2-dnf\n",
"stderr_lines": [
"Error: Unable to find a match: python2-dnf"
],
"stdout": "base 60 kB/s | 24 kB 00:00 \nNo match for argument: python2-dnf\n",
"stdout_lines": [
"base 60 kB/s | 24 kB 00:00 ",
"No match for argument: python2-dnf"
]
}
[root@centos7 ansible]#