plugins/provisioners/ansible: use exist? check

/cc @ches
This commit is contained in:
Mitchell Hashimoto 2013-08-09 11:04:35 -07:00
parent 15142704eb
commit ac8b2c5047
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ module VagrantPlugins
# Validate the existence of the inventory_file, if specified
if inventory_file
expanded_path = Pathname.new(inventory_file).expand_path(machine.env.root_path)
unless expanded_path.file? || expanded_path.directory?
if !expanded_path.exist?
errors << I18n.t("vagrant.provisioners.ansible.inventory_file_path_invalid",
:path => expanded_path)
end