From 3f2d648691103e6989db52b436e881b20efaeeb4 Mon Sep 17 00:00:00 2001 From: Robert McMahon Date: Sat, 6 Aug 2022 20:24:17 -0400 Subject: [PATCH] Fixed issue provisioning ubuntu 22.04 python-dev has no install candidate --- .../provisioners/ansible/cap/guest/debian/ansible_install.rb | 2 +- .../ansible/cap/guest/shared/pip_ansible_install_examples.rb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb b/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb index b77c875a0..5000809aa 100644 --- a/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb +++ b/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb @@ -37,7 +37,7 @@ INLINE_CRIPT def self.pip_setup(machine, pip_install_cmd = "") machine.communicate.sudo "apt-get update -y -qq" - machine.communicate.sudo "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev" + machine.communicate.sudo "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev-is-python3" Pip::get_pip machine, pip_install_cmd end diff --git a/test/unit/plugins/provisioners/ansible/cap/guest/shared/pip_ansible_install_examples.rb b/test/unit/plugins/provisioners/ansible/cap/guest/shared/pip_ansible_install_examples.rb index b897d94a3..1e4018689 100644 --- a/test/unit/plugins/provisioners/ansible/cap/guest/shared/pip_ansible_install_examples.rb +++ b/test/unit/plugins/provisioners/ansible/cap/guest/shared/pip_ansible_install_examples.rb @@ -33,8 +33,7 @@ shared_examples_for "Ansible setup via pip on Debian-based systems" do expect(communicator).to receive(:sudo).once.ordered. with("apt-get update -y -qq") expect(communicator).to receive(:sudo).once.ordered. - with("DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev") - expect(communicator).to receive(:sudo).once.ordered. + with("DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev-is-python3 with("pip install --upgrade ansible") subject.ansible_install(machine, :pip, "", "", pip_install_cmd) @@ -44,7 +43,7 @@ shared_examples_for "Ansible setup via pip on Debian-based systems" do expect(communicator).to receive(:sudo).once.ordered. with("apt-get update -y -qq") expect(communicator).to receive(:sudo).once.ordered. - with("DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev") + with("DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev-is-python3") expect(communicator).to receive(:sudo).once.ordered. with("pip install")