module stderr bin sh 1 usr bin python not found n MODULE FAILURE nSee stdout stderr for the exact error

0 votes

Hi Guys,

I am trying to run Ansible Playbook. But it is showing the below error.

FAILED! => {"changed": false, 
"module_stderr": "/bin/sh: 1: /usr/bin/python: not found\n", 
"module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", 
"rc": 127
Sep 17, 2020 in Ansible by akhtar
• 38,260 points
9,411 views

1 answer to this question.

0 votes

Hi@akhtar,

This is because your system does not include /usr/bin/python (Python 2) by default. Your playbook is trying to use Python 2 (/usr/bin/python) by default. So either you can install or if you have python3 then you can use the below trick in your playbook.

  hosts: "*"
  vars:
    ansible_python_interpreter: /usr/bin/python3
  tasks:
    - debug: var=ansible_host
answered Sep 17, 2020 by MD
• 95,460 points

Related Questions In Ansible

0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
+2 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP