From 7e436c6971da005eade184e3c728ef21ed5e69b9 Mon Sep 17 00:00:00 2001 From: Eugenio Marzo Date: Tue, 1 Aug 2017 20:36:38 +0200 Subject: [PATCH] fixed warnings about missing folders for Chef Solo and Zero --- plugins/provisioners/chef/provisioner/chef_solo.rb | 3 ++- templates/locales/en.yml | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/provisioners/chef/provisioner/chef_solo.rb b/plugins/provisioners/chef/provisioner/chef_solo.rb index 64876ffde..cc613af8a 100644 --- a/plugins/provisioners/chef/provisioner/chef_solo.rb +++ b/plugins/provisioners/chef/provisioner/chef_solo.rb @@ -87,7 +87,8 @@ module VagrantPlugins key = Digest::MD5.hexdigest(local_path) remote_path = "#{guest_provisioning_path}/#{key}" else - @machine.ui.warn(I18n.t("vagrant.provisioners.chef.cookbook_folder_not_found_warning", + appended_folder = "cookbooks" if appended_folder.nil? + @machine.ui.warn(I18n.t("vagrant.provisioners.chef.#{appended_folder}_folder_not_found_warning", path: local_path.to_s)) next end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index f6da5f97a..04b05ed49 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -2160,8 +2160,16 @@ 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: + cookbooks_folder_not_found_warning: "The cookbook path '%{path}' doesn't exist. Ignoring..." + nodes_folder_not_found_warning: + "The node path '%{path}' doesn't exist. Ignoring..." + data_bags_folder_not_found_warning: + "The databag path '%{path}' doesn't exist. Ignoring..." + roles_folder_not_found_warning: + "The role path '%{path}' doesn't exist. Ignoring..." + environments_folder_not_found_warning: + "The environment path '%{path}' doesn't exist. Ignoring..." json: "Generating chef JSON and uploading..." client_key_folder: "Creating folder to hold client key..." generating_node_name: |-