Set python version to 2.7 as all other ansible provisioners do
This commit is contained in:
parent
76e098039b
commit
d1d214f6e2
@ -24,13 +24,12 @@ module VagrantPlugins
|
||||
private
|
||||
|
||||
def self.ansible_apk_install(machine)
|
||||
machine.communicate.sudo "apk add --update --no-cache python3 ansible"
|
||||
machine.communicate.sudo "apk add --update --no-cache python ansible"
|
||||
end
|
||||
|
||||
def self.pip_setup(machine, pip_install_cmd = "")
|
||||
machine.communicate.sudo "apk add --update --no-cache python3"
|
||||
machine.communicate.sudo "if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi"
|
||||
machine.communicate.sudo "apk add --update --no-cache --virtual .build-deps python3-dev libffi-dev openssl-dev build-base"
|
||||
machine.communicate.sudo "apk add --update --no-cache python"
|
||||
machine.communicate.sudo "apk add --update --no-cache --virtual .build-deps python-dev libffi-dev openssl-dev build-base"
|
||||
Pip::get_pip machine, pip_install_cmd
|
||||
end
|
||||
|
||||
|
||||
@ -26,11 +26,9 @@ describe VagrantPlugins::Ansible::Cap::Guest::Alpine::AnsibleInstall do
|
||||
describe "#pip_setup" do
|
||||
it "install required alpine packages for pip" do
|
||||
expect(communicator).to receive(:sudo).once.ordered.
|
||||
with("apk add --update --no-cache python3")
|
||||
with("apk add --update --no-cache python")
|
||||
expect(communicator).to receive(:sudo).once.ordered.
|
||||
with("if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi")
|
||||
expect(communicator).to receive(:sudo).once.ordered.
|
||||
with("apk add --update --no-cache --virtual .build-deps python3-dev libffi-dev openssl-dev build-base")
|
||||
with("apk add --update --no-cache --virtual .build-deps python-dev libffi-dev openssl-dev build-base")
|
||||
|
||||
subject.pip_setup(machine)
|
||||
end
|
||||
@ -43,7 +41,7 @@ describe VagrantPlugins::Ansible::Cap::Guest::Alpine::AnsibleInstall do
|
||||
describe "when install_mode is :default (or unknown)" do
|
||||
it "installs ansible with 'apk' package manager" do
|
||||
expect(communicator).to receive(:sudo).once.ordered.
|
||||
with("apk add --update --no-cache python3 ansible")
|
||||
with("apk add --update --no-cache python ansible")
|
||||
|
||||
subject.ansible_install(machine, :default, "", "", "")
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user