Hello,
I’ve ansible control node(CentOS 7) which is used to scp build image to target server(FreeBSD 11.04). It was just working fine last week. However, today I’d tried to run playbook, it got failed with below error message.
Thank you Vladimir for responding.
Yes, both Python2.7 and Python 3.7 are supported by FreeBSD. I tried with ansible_python_interpreter = ‘/usr/local/bin/python3’ and encountered the same error.
fatal: [zsdev-nrt-smca2]: FAILED! => {
“ansible_facts”: {},
“changed”: false,
“failed_modules”: {
“setup”: {
“failed”: true,
“module_stderr”: “OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 58: Appl
ying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwa
rds: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done
pid = 2334\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header fa
iled: Broken pipe\r\ndebug2: Received exit status from master 1\r\nShared connection to X.X.X.X closed.\r\n”,
“module_stdout”: “sudo: (null): option "passprompt_override" does not take a value\r\r\nsudo: error initializing audit plugin sudoers_audit\r\r\n”,
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,
“rc”: 1
}
},
“msg”: “The following modules failed to execute: setup\n”
Strange,
especially if it was working b4. what has changed ?
Are u able to run sudo without issues on the remote host ?
Also check your sudoers file with visudo -c (on the remote node)
very interesting, indeed Matt.
just checked and freebsd 11.4 ships with sudo 1.9.8 which is subject to the bug, this can be checked with sudo -p ’ ’ true @Mohammad, I suggest you patch your sudo package to 1.9.8.p1; that will probably solve your issue.
In FreeBSD, Python 2.7 is not supported anymore but might work. I
tested old 10.3 and it is working with 2.7. The controller is CentOS
8, Ansible 2.9 and Python 3.6
$ cat /etc/redhat-release
CentOS Linux release 8.4.2105
$ ansible --version
ansible 2.9.23
...
location = /usr/bin/ansible python version = 3.6.8 (default, Mar 19
2021, 05:13:41) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
1) Are yo able connect to the remote host? $ ssh admin@host
2) Are you able to ping it? $ ansible host -u admin -m ping
3) Are you able to run setup? $ ansible host -u admin -m setup
4) Try with Python >= 3.6
...
I’m sharing the steps which I’d followed to troubleshoot and resolved the issue:
sudo -p ‘’ true
if not output, all good
else below output
sudo: (null): option “passprompt_override” does not take a value
sudo: error initializing audit plugin sudoers_audit