Skip to content
Permalink
Browse files

Merge pull request #1104 from roots/fix-vagrant-local-ansible

Fix issues with Vagrant ansible_local provisioner
  • Loading branch information...
swalkinshaw committed Sep 3, 2019
2 parents e776cc0 + 143be08 commit aecb640457a0ee72e6fc42ec34f74a190314617d
Showing with 14 additions and 0 deletions.
  1. +14 −0 Vagrantfile
@@ -117,9 +117,23 @@ Vagrant.configure('2') do |config|
provisioner = local_provisioning? ? :ansible_local : :ansible
provisioning_path = local_provisioning? ? ANSIBLE_PATH_ON_VM : ANSIBLE_PATH

# Fix for https://github.com/hashicorp/vagrant/issues/10914
if local_provisioning?
config.vm.provision 'shell', inline: <<~SHELL
sudo apt-get update -y -qq &&
sudo dpkg-reconfigure libc6 &&
export DEBIAN_FRONTEND=noninteractive &&
sudo -E apt-get -q --option \"Dpkg::Options::=--force-confold\" --assume-yes install libssl1.1
SHELL
end

config.vm.provision provisioner do |ansible|
if local_provisioning?
ansible.install_mode = 'pip'
if Vagrant::VERSION >= '2.2.4'
# Fix for https://github.com/hashicorp/vagrant/issues/10950
ansible.pip_install_cmd = 'curl https://bootstrap.pypa.io/get-pip.py | sudo python'
end
ansible.provisioning_path = provisioning_path
ansible.version = vconfig.fetch('vagrant_ansible_version')
end

0 comments on commit aecb640

Please sign in to comment.
You can’t perform that action at this time.