Not an error if cookbooks path is missing
This commit is contained in:
parent
8e5b52c00c
commit
28de46f3b4
|
@ -82,6 +82,8 @@ BUG FIXES:
|
|||
- Multiple machines defined in the same Vagrantfile with the same
|
||||
name will properly merge.
|
||||
- More robust hostname checking for RedHat. [GH-1566]
|
||||
- Cookbook path existence for Chef is no longer an error, so that
|
||||
things like librarian and berkshelf plugins work properly. [GH-1570]
|
||||
|
||||
## 1.1.6 (April 3, 2013)
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@ module VagrantPlugins
|
|||
@__defaulted_cookbooks_path = false
|
||||
end
|
||||
|
||||
#------------------------------------------------------------
|
||||
# Internal methods
|
||||
#------------------------------------------------------------
|
||||
|
||||
def finalize!
|
||||
@recipe_url = nil if @recipe_url == UNSET_VALUE
|
||||
|
||||
|
@ -58,18 +62,6 @@ module VagrantPlugins
|
|||
errors << I18n.t("vagrant.config.chef.run_list_empty") if \
|
||||
!run_list || run_list.empty?
|
||||
|
||||
if !@__defaulted_cookbooks_path
|
||||
@cookbooks_path.each do |type, path|
|
||||
next if type != :host
|
||||
expanded_path = File.expand_path(path, machine.env.root_path)
|
||||
|
||||
if !File.exist?(expanded_path)
|
||||
errors << I18n.t("vagrant.config.chef.cookbooks_path_missing",
|
||||
:path => expanded_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
{ "chef solo provisioner" => errors }
|
||||
end
|
||||
|
||||
|
|
|
@ -73,7 +73,8 @@ module VagrantPlugins
|
|||
# Path exists on the host, setup the remote path
|
||||
remote_path = "#{@config.provisioning_path}/chef-solo-#{get_and_update_counter(:cookbooks_path)}"
|
||||
else
|
||||
@logger.warn("Chef path doesn't exist, not sharing: #{local_path}")
|
||||
@machine.ui.warn(I18n.t("vagrant.provisioners.chef.cookbook_folder_not_found_warning",
|
||||
path: local_path.to_s))
|
||||
next
|
||||
end
|
||||
else
|
||||
|
|
|
@ -1042,6 +1042,8 @@ en:
|
|||
The chef binary (either `chef-solo` or `chef-client`) was not found on
|
||||
the VM and is required for chef provisioning. Please verify that chef
|
||||
is installed and that the binary is available on the PATH.
|
||||
cookbook_folder_not_found_warning:
|
||||
"The cookbook path '%{path}' doesn't exist. Ignoring..."
|
||||
json: "Generating chef JSON and uploading..."
|
||||
client_key_folder: "Creating folder to hold client key..."
|
||||
upload_validation_key: "Uploading chef client validation key..."
|
||||
|
|
Loading…
Reference in New Issue