Config has pip_install_cmd for Provisioner to pick it up. Tests updated.
This commit is contained in:
parent
8418d26037
commit
d2c11e81ae
|
@ -11,6 +11,7 @@ module VagrantPlugins
|
||||||
attr_accessor :install
|
attr_accessor :install
|
||||||
attr_accessor :install_mode
|
attr_accessor :install_mode
|
||||||
attr_accessor :pip_args
|
attr_accessor :pip_args
|
||||||
|
attr_accessor :pip_install_cmd
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super
|
super
|
||||||
|
@ -18,6 +19,7 @@ module VagrantPlugins
|
||||||
@install = UNSET_VALUE
|
@install = UNSET_VALUE
|
||||||
@install_mode = UNSET_VALUE
|
@install_mode = UNSET_VALUE
|
||||||
@pip_args = UNSET_VALUE
|
@pip_args = UNSET_VALUE
|
||||||
|
@pip_install_cmd = UNSET_VALUE
|
||||||
@provisioning_path = UNSET_VALUE
|
@provisioning_path = UNSET_VALUE
|
||||||
@tmp_path = UNSET_VALUE
|
@tmp_path = UNSET_VALUE
|
||||||
end
|
end
|
||||||
|
@ -28,6 +30,7 @@ module VagrantPlugins
|
||||||
@install = true if @install == UNSET_VALUE
|
@install = true if @install == UNSET_VALUE
|
||||||
@install_mode = :default if @install_mode == UNSET_VALUE
|
@install_mode = :default if @install_mode == UNSET_VALUE
|
||||||
@pip_args = "" if @pip_args == UNSET_VALUE
|
@pip_args = "" if @pip_args == UNSET_VALUE
|
||||||
|
@pip_install_cmd = "" if @pip_args == UNSET_VALUE
|
||||||
@provisioning_path = "/vagrant" if provisioning_path == UNSET_VALUE
|
@provisioning_path = "/vagrant" if provisioning_path == UNSET_VALUE
|
||||||
@tmp_path = "/tmp/vagrant-ansible" if tmp_path == UNSET_VALUE
|
@tmp_path = "/tmp/vagrant-ansible" if tmp_path == UNSET_VALUE
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,7 +32,10 @@ module VagrantPlugins
|
||||||
#
|
#
|
||||||
# Current limitations:
|
# Current limitations:
|
||||||
# - The installation of a specific Ansible version is only supported by
|
# - The installation of a specific Ansible version is only supported by
|
||||||
# the "pip" install_mode.
|
# the "pip" install_mode. Note that "pip" installation also takes place
|
||||||
|
# via a default command. If pip needs to be installed differently then
|
||||||
|
# the command can be overwritten by supplying "pip_install_cmd" in the
|
||||||
|
# config settings.
|
||||||
# - There is no absolute guarantee that the automated installation will replace
|
# - There is no absolute guarantee that the automated installation will replace
|
||||||
# a previous Ansible installation (although it works fine in many cases)
|
# a previous Ansible installation (although it works fine in many cases)
|
||||||
#
|
#
|
||||||
|
@ -51,7 +54,7 @@ module VagrantPlugins
|
||||||
(config.version.to_s.to_sym == :latest ||
|
(config.version.to_s.to_sym == :latest ||
|
||||||
!@machine.guest.capability(:ansible_installed, config.version))
|
!@machine.guest.capability(:ansible_installed, config.version))
|
||||||
@machine.ui.detail I18n.t("vagrant.provisioners.ansible.installing")
|
@machine.ui.detail I18n.t("vagrant.provisioners.ansible.installing")
|
||||||
@machine.guest.capability(:ansible_install, config.install_mode, config.version, config.pip_args)
|
@machine.guest.capability(:ansible_install, config.install_mode, config.version, config.pip_args, config.pip_install_cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
# This step will also fetch the Ansible version data into related instance variables
|
# This step will also fetch the Ansible version data into related instance variables
|
||||||
|
|
|
@ -32,6 +32,7 @@ describe VagrantPlugins::Ansible::Config::Guest do
|
||||||
inventory_path
|
inventory_path
|
||||||
limit
|
limit
|
||||||
pip_args
|
pip_args
|
||||||
|
pip_install_cmd
|
||||||
playbook
|
playbook
|
||||||
playbook_command
|
playbook_command
|
||||||
provisioning_path
|
provisioning_path
|
||||||
|
|
Loading…
Reference in New Issue