ansible ubuntu

How to run Ansible on Ubuntu 16.04?

If you visit my blog frequently, I always use Vagrant with Ansible for setting up my local development or provisioning a staging server.

This command

ansible-playbook -i inventories/staging playbook.yml

always working well for me but today I met this error

FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "\r\n/bin/sh: 1: /usr/bin/python: not found\r\n", "msg": "MODULE FAILURE", "parsed": false}

After spending time for checking, Python 2.7 was not yet installed on the Ubuntu 16.04 as it should be so Ansible could not run well.

It is quite easy to fix by just install python 2.7 with this command:

sudo apt-get install python-minimal
#checking ansible version
python --version
Python 2.7.12

After that, I could provision LAMP Stack successfully to deploy my new magento website on AWS Ubuntu 16.04 EC2 instance.


I hope this post can help you quickly resolve your issue.

ansible ubuntu

How to run Ansible on Ubuntu 16.04?

Join The Ride

Subscribe to our fortnightly newsletter with stories from our latest adventures and the best travel tips

Table of Contents