I have the following ansible playbook:
- hosts: myhosts
gather_facts: no
tasks:
- debug:
msg: just a test message
When I run that from command line I get:
PLAY RECAP ****************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
So that works just fine. But if I add:
- hosts: myhosts
gather_facts: no
tasks:
- debug:
msg: just a test message
- name: Another task
command: echo "Do whatever you want to"
It fails with:
TASK [Another task] *******************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to localhost closed.\r\n", "module_stdout": "/bin/sh: 1: /usr/bin/python: not found\r\n", "msg": "MODULE FAILURE", "rc": 0}
to retry, use: --limit @/home/user/sandbox/ansible-vps/foo.retry
PLAY RECAP ****************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
From what i have googled Ansible requires python2.7 for most of its functionality - which I currently don't have installed. So is the above error caused by missing Python2.7 or something else?