Skip to content

Commit

Permalink
Hotfix: Ansible install, python2 depricated
Browse files Browse the repository at this point in the history
As of 23rd January, 2021, pip v21.0 depricated python2
and removed support for python2. As of now, ansible seems to use
python2 for deployment.
pypa/pip#6148

This broke the installation. For hotfix, added customa pip install
command based on Vagrant's ansible local documentation
https://www.vagrantup.com/docs/provisioning/ansible_local

Note: Requires fairly recent version of vagrant
  • Loading branch information
pranayga authored and 6r0k3d committed Feb 2, 2021
1 parent b91b3fd commit c9be7f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Vagrant.configure("2") do |config|
shell.vm.provision "ansible_local" do |ansible|
ansible.install = "yes"
ansible.install_mode = "pip"
ansible.pip_install_cmd = "curl https://bootstrap.pypa.io/2.7/get-pip.py | sudo python"
ansible.version = "2.9.11"
ansible.compatibility_mode = "2.0"
ansible.playbook = "site.yml"
Expand Down Expand Up @@ -87,6 +88,7 @@ Vagrant.configure("2") do |config|
web.vm.provision "ansible_local" do |ansible|
ansible.install = "yes"
ansible.install_mode = "pip"
ansible.pip_install_cmd = "curl https://bootstrap.pypa.io/2.7/get-pip.py | sudo python"
ansible.version = "2.9.11"
ansible.compatibility_mode = "2.0"
ansible.playbook = "site.yml"
Expand Down

0 comments on commit c9be7f5

Please sign in to comment.