I'm provisioning a Vagrant box (ubuntu/trusty64) with Ansible.
When executing the following playbook:
---
- hosts: all
tasks:
- name: install pip
easy_install:
name: pip
state: present
- name: install gunicorn and flask
pip: name={{ item }}
with_items:
- gunicorn
- flask
I'm receiving the error below:
Failed to find required executable easy_install in paths
Searching for a solution I found this stackoverflow thread which point on the fact that using easy_install
is outdated.
I haven't found any hints in the Ansible easy_install docs.
Any help will be appreciated.
My Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision :ansible do |ansible|
ansible.playbook = "playbook.yml"
end
end
Running with:
Ansible 2.7.10.
Vagrant 2.0.2.
Full Stacktrace of the error mentioned:
TASK [install pip]
fatal: [default]: FAILED! => {"changed": false, "msg": "Failed to find required executable easy_install in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"} to retry, use: --limit @/home/workspaces/python_flask/playbook.retry
PLAY RECAP
easy_install
is simply not installed on your base vagrant box. – Zeitounator