# Ansible Module Failure

**URL:** <https://forum.ansible.com/t/ansible-module-failure/31119>\
**Category:** Ansible Project\
**Tags:** rhel, fedora, aws\
**Created:** [August 24, 2019, 7:22pm UTC](https://forum.ansible.com/t/ansible-module-failure/31119 "2019-08-24T19:22:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Morgan](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Post date:** [August 24, 2019, 7:22pm UTC](https://forum.ansible.com/t/ansible-module-failure/31119/1 "2019-08-24T19:22:28Z")

</div>

Hello All,

I am running ansible from a MAC 2018, ansible version 2.8.3 and trying to update servers in AWS (Amazon Linux) . I can successfully ping all the servers, and can run my playbook on ALL server BUT on dev\_FE and I don’t understand why.Please assist.

`

ansible-playbook -vvv -i inventory --limit=dev\_FE main.yml  
ansible-playbook 2.8.3  
config file = /WALLETHUB/ansible/patch\_server/ansible.cfg  
configured module search path = [‘/var/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible  
executable location = /usr/local/bin/ansible-playbook  
python version = 3.7.4 (default, Jul 9 2019, 18:13:23) [Clang 10.0.1 (clang-1001.0.46.4)]  
Using /WALLETHUB/ansible/patch\_server/ansible.cfg as config file  
host\_list declined parsing /WALLETHUB/ansible/patch\_server/inventory as it did not pass it’s verify\_file() method  
script declined parsing /WALLETHUB/ansible/patch\_server/inventory as it did not pass it’s verify\_file() method  
auto declined parsing /WALLETHUB/ansible/patch\_server/inventory as it did not pass it’s verify\_file() method  
Parsed /WALLETHUB/ansible/patch\_server/inventory inventory source with ini plugin

PLAYBOOK: main.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in main.yml

PLAY [wallethub] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /WALLETHUB/ansible/patch\_server/main.yml:2  
\<3.220.249.184\> ESTABLISH SSH CONNECTION FOR USER: andrewm  
\<3.220.249.184\> SSH: EXEC sshpass -d41 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o ‘IdentityFile=“/Users/confluencetrades/Desktop/andrewm.pem”’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d 3.220.249.184 ‘/bin/sh -c ‘"’“‘echo ~andrewm && sleep 0’”’“‘’  
\<3.220.249.184\> (0, b’/home/andrewm\n’, b’')  
\<3.220.249.184\> ESTABLISH SSH CONNECTION FOR USER: andrewm  
\<3.220.249.184\> SSH: EXEC sshpass -d41 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o 'IdentityFile=”/Users/confluencetrades/Desktop/andrewm.pem"’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d 3.220.249.184 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “`echo /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587`” && echo ansible-tmp-1566672582.347262-86980762832587=“`echo /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587`” ) && sleep 0’“'”‘’  
\<3.220.249.184\> (0, b’ansible-tmp-1566672582.347262-86980762832587=/home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587\n’, b’‘)  
\<dev\_FE\> Attempting python interpreter discovery  
\<3.220.249.184\> ESTABLISH SSH CONNECTION FOR USER: andrewm  
\<3.220.249.184\> SSH: EXEC sshpass -d41 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o ‘IdentityFile=“/Users/confluencetrades/Desktop/andrewm.pem”’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d 3.220.249.184 ‘/bin/sh -c ‘"’“'echo PLATFORM; uname; echo FOUND; command -v '”’"’“'”‘"’“'”‘"’/usr/bin/python’“'”‘"’“'”‘"’“'”‘; command -v ‘"’"’“'”‘"’“'”‘“‘python3.7’”’“'”‘"’“'”‘"’“'; command -v '”‘"’“'”‘"’“'”‘“‘python3.6’”’“'”‘"’“'”‘"’“'; command -v '”‘"’“'”‘"’“'”‘“‘python3.5’”’“'”‘"’“'”‘"’“'; command -v '”‘"’“'”‘"’“'”‘“‘python2.7’”’“'”‘"’“'”‘"’“'; command -v '”‘"’“'”‘"’“'”‘“‘python2.6’”’“'”‘"’“'”‘"’“'; command -v '”‘"’“'”‘"’“'”‘"’/usr/libexec/platform-python’“'”‘"’“'”‘"’“'”‘; command -v ‘"’"’“'”‘"’“'”‘"’/usr/bin/python3’“'”‘"’“'”‘"’“'”‘; command -v ‘"’"’“'”‘"’“'”‘“‘python’”’“'”‘"’“'”‘"’“‘; echo ENDFOUND && sleep 0’”‘"’’  
\<3.220.249.184\> (0, b’PLATFORM\nLinux\nFOUND\n/usr/bin/python\n/usr/bin/python2.7\n/usr/bin/python2.6\n/usr/bin/python\nENDFOUND\n’, b’‘)  
\<3.220.249.184\> ESTABLISH SSH CONNECTION FOR USER: andrewm  
\<3.220.249.184\> SSH: EXEC sshpass -d41 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o ‘IdentityFile=“/Users/confluencetrades/Desktop/andrewm.pem”’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d 3.220.249.184 ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’  
\<3.220.249.184\> (0, b’{“osrelease\_content”: “NAME=\“Amazon Linux AMI\”\nVERSION=\“2018.03\”\nID=\“amzn\”\nID\_LIKE=\“rhel fedora\”\nVERSION\_ID=\“2018.03\”\nPRETTY\_NAME=\“Amazon Linux AMI 2018.03\”\nANSI\_COLOR=\“0;33\”\nCPE\_NAME=\“cpe:/o:amazon:linux:2018.03:ga\”\nHOME\_URL=\“[http://aws.amazon.com/amazon-linux-ami/\\“\\n”](http://aws.amazon.com/amazon-linux-ami/%5C%5C%22%5C%5Cn%22), “platform\_dist\_result”: [””, “”, “”]}\n’, b’‘)  
\<dev\_FE\> Python interpreter discovery fallback (unsupported Linux distribution: amzn)  
Using module file /usr/local/lib/python3.7/site-packages/ansible/modules/system/setup.py  
\<3.220.249.184\> PUT /var/root/.ansible/tmp/ansible-local-70345dl6qhmdh/tmpajfkdun5 TO /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587/AnsiballZ\_setup.py  
\<3.220.249.184\> SSH: EXEC sshpass -d41 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o ‘IdentityFile=“/Users/confluencetrades/Desktop/andrewm.pem”’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d ‘[3.220.249.184]’  
\<3.220.249.184\> (0, b’sftp\> put /var/root/.ansible/tmp/ansible-local-70345dl6qhmdh/tmpajfkdun5 /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587/AnsiballZ\_setup.py\n’, b’‘)  
\<3.220.249.184\> ESTABLISH SSH CONNECTION FOR USER: andrewm  
\<3.220.249.184\> SSH: EXEC sshpass -d41 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o ‘IdentityFile=“/Users/confluencetrades/Desktop/andrewm.pem”’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d 3.220.249.184 ‘/bin/sh -c ‘"’“‘chmod u+x /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587/ /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587/AnsiballZ\_setup.py && sleep 0’”’"’’  
\<3.220.249.184\> (0, b’‘, b’‘)  
\<3.220.249.184\> ESTABLISH SSH CONNECTION FOR USER: andrewm  
\<3.220.249.184\> SSH: EXEC sshpass -d41 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o ‘IdentityFile=“/Users/confluencetrades/Desktop/andrewm.pem”’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d -tt 3.220.249.184 ‘/bin/sh -c ‘"’“'sudo -H -S -p “[sudo via ansible, key=odjslmmymcfjguanwabuzngyvowjxzsy] password:” -u root /bin/sh -c '”’"’“'”‘"’“'”‘“‘echo BECOME-SUCCESS-odjslmmymcfjguanwabuzngyvowjxzsy ; /usr/bin/python /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587/AnsiballZ\_setup.py’”’“'”‘"’“'”‘"’“’ && sleep 0’”‘"’’  
Escalation succeeded  
\<3.220.249.184\> (1, b’\r\n’, b’Shared connection to 3.220.249.184 closed.\r\n’)  
\<3.220.249.184\> Failed to connect to the host via ssh: Shared connection to 3.220.249.184 closed.  
\<3.220.249.184\> ESTABLISH SSH CONNECTION FOR USER: andrewm  
\<3.220.249.184\> SSH: EXEC sshpass -d41 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=43045 -o ‘IdentityFile=“/Users/confluencetrades/Desktop/andrewm.pem”’ -o ‘User=“andrewm”’ -o ConnectTimeout=10 -o ControlPath=/private/var/root/.ansible/cp/90ef5f326d 3.220.249.184 ‘/bin/sh -c ‘"’“‘rm -f -r /home/andrewm/.ansible/tmp/ansible-tmp-1566672582.347262-86980762832587/ \> /dev/null 2\>&1 && sleep 0’”’"‘’  
\<3.220.249.184\> (0, b’‘, b’')  
fatal: [dev\_FE]: FAILED! =\> {  
“ansible\_facts”: {},  
“changed”: false,  
“failed\_modules”: {  
“setup”: {  
“ansible\_facts”: {  
“discovered\_interpreter\_python”: “/usr/bin/python”  
},  
“failed”: true,  
“module\_stderr”: “Shared connection to 3.220.249.184 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”  
}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
dev\_FE : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

`

`  
TASK [Ping host] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

ok: [dev\_FE]  
`

---

<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:** [August 25, 2019, 12:32am UTC](https://forum.ansible.com/t/ansible-module-failure/31119/2 "2019-08-25T00:32:39Z")

</div>

Hello!

> ansible-playbook 2.8.3  
> [...]  
> -c '"'"'echo PLATFORM; uname; echo FOUND; command -v  
> '"'"'"'"'"'"'"'"'/usr/bin/python'"'"'"'"'"'"'"'"'; command -v  
> '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v  
> '"'"'"'"'"'"'"'"'python3.6'"'"'"'"'"'"'"'"'; command -v  
> '"'"'"'"'"'"'"'"'python3.5'"'"'"'"'"'"'"'"'; command -v  
> '"'"'"'"'"'"'"'"'python2.7'"'"'"'"'"'"'"'"'; command -v  
> '"'"'"'"'"'"'"'"'python2.6'"'"'"'"'"'"'"'"'; command -v  
> [...]  
> \<3.220.249.184\> (0, b'{"osrelease\_content": "NAME=\\"Amazon Linux  
> AMI\\"\\nVERSION=\\"2018.03\\"\\nID=\\"amzn\\"\\nID\_LIKE=\\"rhel  
> fedora\\"\\nVERSION\_ID=\\"2018.03\\"\\nPRETTY\_NAME=\\"Amazon Linux AMI  
> 2018.03\\"\\nANSI\_COLOR=\\"0;33\\"\\nCPE\_NAME=\\"cpe:/o:amazon:linux:2018.03:ga\\"\\nHOME\_URL=\\"[http://aws.amazon.com/amazon-linux-ami/\\\\&quot;\\\\n&quot;](http://aws.amazon.com/amazon-linux-ami/%5C%5C%5C%5C&quot;%5C%5C%5C%5Cn&quot;),  
> "platform\_dist\_result": ["", "", ""]}\n', b'')  
> \<dev\_FE\> Python interpreter discovery fallback (unsupported Linux  
> distribution: amzn)  
> Using module file  
> /usr/local/lib/python3.7/site-packages/ansible/modules/system/setup.py  
> [...]  
> fatal: [dev\_FE]: FAILED! =\> {  
> [...]  
> &nbsp;&nbsp;&nbsp;&nbsp;"msg": "The following modules failed to execute: setup\n"

Set 'ansible\_python\_interpreter' to working version in the inventory and test  
it. For example

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dev\_FE ansible\_python\_interpreter=/usr/bin/python2.7

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ ansible dev\_FE -m ping

Ansible said "unsupported Linux distribution: amzn", picked python3.7 as a  
fallback and crashed. For detailed explanation see the comment in  
[https://github.com/ansible/ansible/blob/devel/lib/ansible/executor/interpreter\_discovery.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/executor/interpreter_discovery.py)  
See also 'Python 3 Support'  
[https://docs.ansible.com/ansible/latest/reference\_appendices/python\_3\_support.html#python-3-support](https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html#python-3-support)

Cheers,

&nbsp;&nbsp;-vlado

---

<div class="post-metadata">

**Author:** ![Andrew\_Morgan](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Post date:** [August 25, 2019, 2:38am UTC](https://forum.ansible.com/t/ansible-module-failure/31119/3 "2019-08-25T02:38:22Z")

</div>

Thank you for your response. I tried that, but still getting the same error. Further explaining my initial comment, I am able to ping all servers. But when running a playbook against the servers, the playbook works except against dev\_fe, and the error is above. I have tried below but still the same error

`dev_FE ansible_ssh_host=3.220.299.184 ansible_ssh_port=22 ansible_python_interpreter=/usr/bin/python2.7`

---

<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:** [August 25, 2019, 4:16am UTC](https://forum.ansible.com/t/ansible-module-failure/31119/4 "2019-08-25T04:16:13Z")

</div>

Set INTERPRETER\_PYTHON\_FALLBACK and put '/usr/bin/python2.7' into the first  
place  
[https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#interpreter-python-fallback](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#interpreter-python-fallback)

If you still don't seen this

&nbsp;&nbsp;Using module file  
&nbsp;&nbsp;/usr/local/lib/python2.7/site-packages/ansible/modules/system/setup.py

then you might want to consider to open an issue if you're sure the  
configuration is all right  
[https://github.com/ansible/ansible/issues](https://github.com/ansible/ansible/issues)

Cheers,

&nbsp;&nbsp;-vlado

---

<div class="post-metadata">

**Author:** ![Andrew\_Morgan](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Post date:** [August 25, 2019, 4:13pm UTC](https://forum.ansible.com/t/ansible-module-failure/31119/5 "2019-08-25T16:13:22Z")

</div>

Thank you for help. I am still seeing

`  
sing module file /usr/local/lib/python3.7/site-packages/ansible/modules/system/setup.p

`

Maybe I am not setting the variable correctly.In my ansible.cfg I have

`INTERPRETER_PYTHON_FALLBACK = '/usr/bin/python2.7'`

Is this correct?

---

<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:** [August 26, 2019, 2:31am UTC](https://forum.ansible.com/t/ansible-module-failure/31119/6 "2019-08-26T02:31:08Z")

</div>

It's not configurable. Sorry for the noise.

Next option is to install only selected version  
[https://docs.aws.amazon.com/cli/latest/userguide/install-linux-python.html](https://docs.aws.amazon.com/cli/latest/userguide/install-linux-python.html)

Cheers,

&nbsp;&nbsp;-vlado

---

<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:** [August 26, 2019, 8:31am UTC](https://forum.ansible.com/t/ansible-module-failure/31119/7 "2019-08-26T08:31:58Z")

</div>

Hi!

> \> \> Set INTERPRETER\_PYTHON\_FALLBACK and put '/usr/bin/python2.7' into the  
> \> \> first place  
> \> \> [https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#interpreter-python-fallback](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#interpreter-python-fallback)

> \> Thank you for help. I am still seeing  
> \> module file /usr/local/lib/python3.7/site-packages/ansible/modules/  
> \> system/setup.py  
> \> Maybe I am not setting the variable correctly.In my ansible.cfg I have  
> \> INTERPRETER\_PYTHON\_FALLBACK = '/usr/bin/python2.7'  
> \> Is this correct?

> It's not configurable. Sorry for the noise.  
> Next option is to install only selected version  
> [https://docs.aws.amazon.com/cli/latest/userguide/install-linux-python.html](https://docs.aws.amazon.com/cli/latest/userguide/install-linux-python.html)

1) My assumption that that "ansible\_python\_interpreter" would affect the  
version of the modul setup.py was wrong.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;module file /usr/local/lib/python3.7/site-packages/ansible/modules/

This is the version of Python at master Ansible is running with

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ansible-playbook -vvv -i inventory --limit=dev\_FE main.yml  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ansible-playbook 2.8.3  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;config file = /WALLETHUB/ansible/patch\_server/ansible.cfg  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;configured module search path = ['/var/root/.ansible/plugins/modules',  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/usr/share/ansible/plugins/modules']  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ansible python module location =  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/lib/python3.7/site-packages/ansible  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;executable location = /usr/local/bin/ansible-playbook  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;python version = 3.7.4 (default, Jul 9 2019, 18:13:23) [Clang 10.0.1  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(clang-1001.0.46.4)]

As a result, this Python version is not an indicator of what is going on at  
remote host.

2) I've tested remote host FreeBSD 12.0 from the master Ubuntu 18.04. All is  
working well with Ansible 2.8.3 and Python 2.7 at master

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ansible 2.8.3  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;config  
&nbsp;&nbsp;&nbsp;file= /export/home/vlado.config/.ansible/ansible-examples/examples/example-155/ansible.cfg  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;configured module search path =  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[u'/home/vlado/.ansible/plugins/modules',  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;u'/usr/share/ansible/plugins/modules'] ansible python module location  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= /usr/lib/python2.7/dist-packages/ansible executable location  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= /usr/bin/ansible python version = 2.7.15+ (default, Nov 27 2018,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23:36:35) [GCC 7.3.0]

both with Python 2.7

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test\_01 | SUCCESS =\> {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ansible\_facts": {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[...]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ansible\_python\_version": "2.7.16",

and Python 3.6 at the remote host.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test\_01 | SUCCESS =\> {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ansible\_facts": {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[...]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ansible\_python\_version": "3.6.7",

3) It's left to find out if the problem is Ansible 2.8 with Python3 in  
general, or if this is a distro problem.

Cheers,

&nbsp;&nbsp;-vlado

---

<div class="post-metadata">

**Author:** ![Andrew\_Morgan](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@Andrew\_Morgan](https://forum.ansible.com/u/Andrew_Morgan)\
**Post date:** [August 26, 2019, 7:21pm UTC](https://forum.ansible.com/t/ansible-module-failure/31119/8 "2019-08-26T19:21:12Z")

</div>

Thank you for your assistance.I have checked and all servers are:

```auto
NAME="Amazon Linux AMI"
VERSION="2018.03"

```

```auto

```

```auto
and python 2.7.16 .Just not sure how else I could check why that one server fails to run the playbook

```
