Minor style fixes for salt config_dir

This commit is contained in:
Seth Vargo 2015-05-30 11:39:18 -07:00
parent 74d22069d4
commit 0b85e04399
1 changed files with 2 additions and 6 deletions

View File

@ -94,10 +94,7 @@ module VagrantPlugins
end end
def default_config_dir(machine) def default_config_dir(machine)
guest_type = machine.config.vm.guest guest_type = machine.config.vm.guest || :linux
if guest_type == nil
guest_type = :linux
end
# FIXME: there should be a way to do that a bit smarter # FIXME: there should be a way to do that a bit smarter
if guest_type == :windows if guest_type == :windows
@ -105,7 +102,6 @@ module VagrantPlugins
else else
return "/etc/salt" return "/etc/salt"
end end
end end
def validate(machine) def validate(machine)
@ -147,7 +143,7 @@ module VagrantPlugins
errors << I18n.t("vagrant.provisioners.salt.must_accept_keys") errors << I18n.t("vagrant.provisioners.salt.must_accept_keys")
end end
if @config_dir == nil if @config_dir.nil?
@config_dir = default_config_dir(machine) @config_dir = default_config_dir(machine)
end end