Vagrant 2.2.4
Arch Linux
Ubuntu 18.10.
Vagrant.configure('2') do |config|
config.ssh.forward_agent = true
config.vm.provision 'ansible_local' do |ansible|
ansible.playbook = 'provisioning/ansible/setup-development-vm.yml'
ansible.compatibility_mode = '2.0'
end
end
Ansible installation should succeed.
The install process gets stuck forever. ps shows this command tree:
/usr/bin/dpkg --status-fd 38 --configure --pending
\_ /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/libssl1.1:amd64.postinst configure 1.1.0g-2ubuntu4.3
\_ /bin/sh /var/lib/dpkg/info/libssl1.1:amd64.postinst configure 1.1.0g-2ubuntu4.3
\_ whiptail --backtitle Package configuration --title Configuring libssl1.1:amd64 --output-fd 11 --defaultno --yesno -- There are services installed on your system which need to be restarted when certain libraries, such as libpam, libc, and libssl, are upgraded. Since these restarts may cause interruptions of service for the system, you will normally be prompted on each upgrade for the list of services you wish to restart. You can choose this option to avoid being prompted; instead, all necessary restarts will be done for you automatically so you can avoid being asked questions on each library upgrade. Restart services during package upgrades without asking? 16 77
I assume the whiptail command is keeping the script from completing.
vagrant destroy -fvagrant upUse the shell provisioner to run a script containing this:
sudo apt-get update -y -qq
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq software-properties-common
sudo add-apt-repository ppa:ansible/ansible -y
sudo apt-get update -y -qq
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ansible
Same here since yesterday. You can reproduce by cloning https://github.com/sarramegnag/ansible-vagrant and running vagrant up. Provisionning is stuck at « Installing Ansible » (your workaround works fine).
For the workaround, kill the VM, run vagrant up then vagrant ssh, execute the workaround, then exit and vagrant provision.
EDIT (July 2019): Ubuntu bug 1832919 has been fixed, so I no longer have to run dpkg-reconfigure libc6.
Revised workaround (which means Vagrant can still pull latest Ansible from pip):
# Install libssl for Ansible (https://github.com/hashicorp/vagrant/issues/10914)
config.vm.provision "shell",
inline: "sudo apt-get update -y -qq && "\
"export DEBIAN_FRONTEND=noninteractive && "\
"sudo -E apt-get -q --option \"Dpkg::Options::=--force-confold\" --assume-yes install libssl1.1"
# Provision with Ansible
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "provisioning/vagrant-playbook.yml"
ansible.install_mode = "pip"
end
Original comment:
Likewise, and I've also been bitten by https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1832919 on an Ubuntu 18.04 guest. That bug manifests itself as the Installing Ansible... step failing (rather than hanging), but once resolved I get the hang described here.
For people with my problem, you'll instead see:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
apt-get install -y -qq build-essential curl git libssl-dev libffi-dev python-dev
Stdout from the command:
<...snip...>
Checking init scripts...
dpkg: error processing package libssl1.1:amd64 (--configure):
installed libssl1.1:amd64 package post-installation script subprocess returned error exit status 10
The workaround suggested on Launchpad for the post-installation script failure is to run dpkg-reconfigure libc6. After doing that in a shell provisioning step I get a hang as described here.
My full workaround (which means Vagrant can still pull latest Ansible from pip):
# Install libssl for Ansible (to work around https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1832919)
config.vm.provision "shell",
inline: "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"
# Provision with Ansible
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "provisioning/vagrant-playbook.yml"
ansible.install_mode = "pip"
end
I don't know why but I could manage to make it work from a fresh install of Windows 10 (I was on Insider program) but versions of VirtualBox and Vagrant changed to, so not sure what caused the problem.
Fyi, I'm now using Windows 10 Professionnal version 1809 with VirtualBox 5.2.30 r130521 (Qt5.6.2) and Vagrant 2.2.4.
Upstream ticket: https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1833013
The "workaround" you describe is actually (partially) the correct way to do it. I've written this up in full at https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1833013/comments/6 which I hope explains the background completely. It is therefore not an "upstream" bug from your perspective, so I suggest removing that tag.
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
EDIT (July 2019): Ubuntu bug 1832919 has been fixed, so I no longer have to run
dpkg-reconfigure libc6.Revised workaround (which means Vagrant can still pull latest Ansible from pip):
Original comment:
Likewise, and I've also been bitten by https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1832919 on an Ubuntu 18.04 guest. That bug manifests itself as the
Installing Ansible...step failing (rather than hanging), but once resolved I get the hang described here.For people with my problem, you'll instead see:
The workaround suggested on Launchpad for the post-installation script failure is to run
dpkg-reconfigure libc6. After doing that in a shell provisioning step I get a hang as described here.My full workaround (which means Vagrant can still pull latest Ansible from pip):