# The module failed to execute correctly, you probably need to set the interpreter.\\nSee stdout/stderr for the exact error

**URL:** <https://forum.ansible.com/t/the-module-failed-to-execute-correctly-you-probably-need-to-set-the-interpreter-nsee-stdout-stderr-for-the-exact-error/38204>\
**Category:** Ansible Project\
**Created:** [July 9, 2023, 8:55pm UTC](https://forum.ansible.com/t/the-module-failed-to-execute-correctly-you-probably-need-to-set-the-interpreter-nsee-stdout-stderr-for-the-exact-error/38204 "2023-07-09T20:55:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gusto](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@gusto](https://forum.ansible.com/u/gusto)\
**Post date:** [July 9, 2023, 8:55pm UTC](https://forum.ansible.com/t/the-module-failed-to-execute-correctly-you-probably-need-to-set-the-interpreter-nsee-stdout-stderr-for-the-exact-error/38204/1 "2023-07-09T20:55:15Z")

</div>

Hi, I am new to ansible.  
I have installed ansible and am testing 2 debian servers (ping module) and it works fine

ansible all -m ping  
server1 | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}  
server2 | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}

I have a linux dvb box OpenPLi Enigma2 and I want to test ansible for this box.

My /etc/ansible/hosts

[servers]  
server1 ansible\_host=192.168.20.12 ansible\_port=2288 ansible\_user=abc  
server2 ansible\_host=192.168.20.13 ansible\_port=2288 ansible\_user=abc

[boxes]  
domalunix ansible\_host=10.8.0.161 ansible\_user=root

When I ping the boxes, I get a response

ansible boxes -m ping

domalunix | FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “Shared connection to 10.8.0.161 closed.\r\n”,  
“module\_stdout”: “/bin/sh: /usr/bin/python3: 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  
}

When I ping the dvb box without ansible, everything works. From the ansible server, I can log in to the ssh box using an ssh key (without a password).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [July 17, 2023, 1:52pm UTC](https://forum.ansible.com/t/the-module-failed-to-execute-correctly-you-probably-need-to-set-the-interpreter-nsee-stdout-stderr-for-the-exact-error/38204/2 "2023-07-17T13:52:14Z")

</div>

First, the ping module is not an icmp/networking ping, it is a 'can  
Ansible execute on this machine'. it involves logging in and using a  
version of Python that can return a JSON string.  
The error message is giving you the solution, define the Python to use  
on the remote.
