s/not/!/ in ansible provisioner config
This commit is contained in:
parent
cd14767ef5
commit
d7990721a0
|
@ -34,12 +34,12 @@ module VagrantPlugins
|
||||||
|
|
||||||
def validate(machine)
|
def validate(machine)
|
||||||
errors = []
|
errors = []
|
||||||
|
|
||||||
# Validate that a playbook path was provided
|
# Validate that a playbook path was provided
|
||||||
if !playbook
|
if !playbook
|
||||||
errors << I18n.t("vagrant.provisioners.ansible.no_playbook")
|
errors << I18n.t("vagrant.provisioners.ansible.no_playbook")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Validate the existence of said playbook on the host
|
# Validate the existence of said playbook on the host
|
||||||
if playbook
|
if playbook
|
||||||
expanded_path = Pathname.new(playbook).expand_path(machine.env.root_path)
|
expanded_path = Pathname.new(playbook).expand_path(machine.env.root_path)
|
||||||
|
@ -48,14 +48,14 @@ module VagrantPlugins
|
||||||
:path => expanded_path)
|
:path => expanded_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Validate that extra_vars is a hash, if set
|
# Validate that extra_vars is a hash, if set
|
||||||
if extra_vars
|
if extra_vars
|
||||||
if not extra_vars.kind_of?(Hash)
|
if !extra_vars.kind_of?(Hash)
|
||||||
errors << I18n.t("vagrant.provisioners.ansible.extra_vars_not_hash")
|
errors << I18n.t("vagrant.provisioners.ansible.extra_vars_not_hash")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Validate the existence of the inventory_file, if specified
|
# Validate the existence of the inventory_file, if specified
|
||||||
if inventory_file
|
if inventory_file
|
||||||
expanded_path = Pathname.new(inventory_file).expand_path(machine.env.root_path)
|
expanded_path = Pathname.new(inventory_file).expand_path(machine.env.root_path)
|
||||||
|
|
Loading…
Reference in New Issue