From c9be7f51fb61be8212726dbdd1d3c814e1c6c869 Mon Sep 17 00:00:00 2001 From: Pranay Garg <54598374+pranayga@users.noreply.github.com> Date: Sat, 23 Jan 2021 21:22:46 -0500 Subject: [PATCH] Hotfix: Ansible install, python2 depricated 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. https://github.com/pypa/pip/issues/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 --- Vagrantfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index a4c9887b..f2d8b5d0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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" @@ -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"