provisioners/ansible_local: fix a str-to-sym bug
Without this change `ansible.version = "latest"` is not considered as equivalent to `ansible.version = :latest`.
This commit is contained in:
parent
c6ef73a6fa
commit
75cc6ef8d3
|
@ -45,7 +45,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Try to install Ansible (if needed and requested)
|
# Try to install Ansible (if needed and requested)
|
||||||
if config.install &&
|
if config.install &&
|
||||||
(config.version == :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)
|
@machine.guest.capability(:ansible_install)
|
||||||
|
@ -59,7 +59,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Check if requested ansible version is available
|
# Check if requested ansible version is available
|
||||||
if (!config.version.empty? &&
|
if (!config.version.empty? &&
|
||||||
config.version != :latest &&
|
config.version.to_s.to_sym != :latest &&
|
||||||
!@machine.guest.capability(:ansible_installed, config.version))
|
!@machine.guest.capability(:ansible_installed, config.version))
|
||||||
raise Ansible::Errors::AnsibleVersionNotFoundOnGuest, required_version: config.version.to_s
|
raise Ansible::Errors::AnsibleVersionNotFoundOnGuest, required_version: config.version.to_s
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue