# setup module is failing

**URL:** <https://forum.ansible.com/t/setup-module-is-failing/35761>\
**Category:** Ansible Project\
**Created:** [September 21, 2021, 8:59am UTC](https://forum.ansible.com/t/setup-module-is-failing/35761 "2021-09-21T08:59:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Altif](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Altif](https://forum.ansible.com/u/Altif)\
**Post date:** [September 21, 2021, 8:59am UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/1 "2021-09-21T08:59:16Z")

</div>

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.

ansible-playbook -i zsdev-hosts Scp\_build.yml --extra-vars build\_version=

fatal: [zsdev-nrt-smca2]: FAILED! =\> {

“ansible\_facts”: {},  
“changed”: false,  
“failed\_modules”: {  
“setup”: {  
“failed”: true,  
“module\_stderr”: “Shared 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”  
}

Scp\_build.yml playbook

---

<div class="post-metadata">

**Author:** ![vbotka](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/vbotka/32/359_2.png) [@vbotka](https://forum.ansible.com/u/vbotka)\
**Post date:** [September 21, 2021, 10:03am UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/2 "2021-09-21T10:03:55Z")

</div>

Is the version of Python at FreeBSD supported?  
[https://endoflife.date/python](https://endoflife.date/python)

Try

&nbsp;&nbsp;ansible\_python\_interpreter: /usr/local/bin/python3.6

---

<div class="post-metadata">

**Author:** ![Altif](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Altif](https://forum.ansible.com/u/Altif)\
**Post date:** [September 21, 2021, 1:11pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/3 "2021-09-21T13:11:59Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![steve\_missoh](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@steve\_missoh](https://forum.ansible.com/u/steve_missoh)\
**Post date:** [September 21, 2021, 1:31pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/4 "2021-09-21T13:31:59Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [September 21, 2021, 1:39pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/5 "2021-09-21T13:39:14Z")

</div>

This may be of interest to you: [https://bugzilla.sudo.ws/show\_bug.cgi?id=993](https://bugzilla.sudo.ws/show_bug.cgi?id=993)

There was a bug in sudo 1.9.8 that has since been fixed.

---

<div class="post-metadata">

**Author:** ![steve\_missoh](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@steve\_missoh](https://forum.ansible.com/u/steve_missoh)\
**Post date:** [September 21, 2021, 1:59pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/6 "2021-09-21T13:59:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vbotka](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/vbotka/32/359_2.png) [@vbotka](https://forum.ansible.com/u/vbotka)\
**Post date:** [September 21, 2021, 2:59pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/7 "2021-09-21T14:59:25Z")

</div>

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)]

$ ansible host1 -m setup | grep ansible\_python\_version  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ansible\_python\_version": "2.7.13"

From your data it's not possible to say what is the problem. To move  
forward, minimize your setup and locate the problem. See  
Troubleshooting Guide  
[https://docs.ansible.com/ansible/latest/network/user\_guide/network\_debug\_troubleshooting.html](https://docs.ansible.com/ansible/latest/network/user_guide/network_debug_troubleshooting.html)

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  
...

---

<div class="post-metadata">

**Author:** ![Altif](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Altif](https://forum.ansible.com/u/Altif)\
**Post date:** [September 21, 2021, 4:30pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/8 "2021-09-21T16:30:22Z")

</div>

Thanks again Vladimir. I’d tried following troubleshooting guide, here is the results:

**Ansible Control Node**

---

<div class="post-metadata">

**Author:** ![Altif](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Altif](https://forum.ansible.com/u/Altif)\
**Post date:** [September 21, 2021, 6:38pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/9 "2021-09-21T18:38:43Z")

</div>

Thank you so much Vladimir, Matt and Stefi… as Matt pointed that there is bug in sudo-1.9.8. Once upgrading to **sudo-1.9.8p1,** issue got resolved.

Thanks again for helping me out, truly appeciated 🙂

Stay safe and healthy!

---

<div class="post-metadata">

**Author:** ![Altif](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Altif](https://forum.ansible.com/u/Altif)\
**Post date:** [September 21, 2021, 6:42pm UTC](https://forum.ansible.com/t/setup-module-is-failing/35761/10 "2021-09-21T18:42:57Z")

</div>

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

#check sudoer file parsing  
visudo -c

#check sudo version  
sudo -V

#backup existing sudoers file  
cp /usr/local/etc/sudoers /sc/build/

#download sudo package:  
cd /sc/build/ && fetch [https://www.sudo.ws/dist/sudo-1.9.8p1.tar.gz](https://www.sudo.ws/dist/sudo-1.9.8p1.tar.gz)  
tar -xvf sudo-1.9.8p1.tar.gz && cd sudo-1.9.8p1

./configure --build=amd64-unknown-freebsd24  
make  
make install  
cp sudoers /etc/sudoers && cp sudoers /usr/local/etc/sudoers

Hope, it’d help someone.
