"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 in Ansible by akhtar
• 27,980 points
120 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 by MD
• 64,820 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
719 views
+2 votes
1 answer