diff --git a/plugins/provisioners/chef/provisioner/chef_zero.rb b/plugins/provisioners/chef/provisioner/chef_zero.rb index 70fff6854..43bdf648e 100644 --- a/plugins/provisioners/chef/provisioner/chef_zero.rb +++ b/plugins/provisioners/chef/provisioner/chef_zero.rb @@ -35,6 +35,7 @@ module VagrantPlugins upload_encrypted_data_bag_secret setup_json setup_zero_config + verify_chef_nodes_folder run_chef_zero delete_encrypted_data_bag_secret end @@ -101,6 +102,12 @@ module VagrantPlugins end end + def verify_chef_nodes_folder + if not File.exists? @config.nodes_path[0][1] + raise ChefError, :missing_chef_node_folder + end + end + protected # Extracts only the remote paths from a list of folders diff --git a/templates/locales/en.yml b/templates/locales/en.yml index deae43256..a05c267c2 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -2192,6 +2192,8 @@ en: running_solo_again: "Running chef-solo again (failed to converge)..." running_zero: "Running chef-client (local-mode)..." running_zero_again: "Running chef-client (local-mode) again (failed to converge)..." + missing_chef_node_folder: |- + Nodes folder that Chef requires is missing in this Vagrant project missing_shared_folders: |- Shared folders that Chef requires are missing on the virtual machine. This is usually due to configuration changing after already booting the