From 97d5a6ebfcb55238fbe288099dbfb7a7aadff46c Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sun, 28 Dec 2014 12:52:54 -0500 Subject: [PATCH] Log chef-zero instead of chef-solo --- plugins/provisioners/chef/provisioner/chef_solo.rb | 10 +++++----- plugins/provisioners/chef/provisioner/chef_zero.rb | 4 ++++ templates/locales/en.yml | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/plugins/provisioners/chef/provisioner/chef_solo.rb b/plugins/provisioners/chef/provisioner/chef_solo.rb index d05794f18..af9314bd9 100644 --- a/plugins/provisioners/chef/provisioner/chef_solo.rb +++ b/plugins/provisioners/chef/provisioner/chef_solo.rb @@ -34,7 +34,7 @@ module VagrantPlugins share_folders(root_config, "cse", @environments_folders) end - def provision + def provision(mode = :solo) install_chef # Verify that the proper shared folders exist. check = [] @@ -51,7 +51,7 @@ module VagrantPlugins upload_encrypted_data_bag_secret setup_json setup_solo_config - run_chef_solo + run_chef(mode) delete_encrypted_data_bag_secret end @@ -130,7 +130,7 @@ module VagrantPlugins } end - def run_chef_solo + def run_chef(mode) if @config.run_list && @config.run_list.empty? @machine.ui.warn(I18n.t("vagrant.chef_run_list_empty")) end @@ -143,9 +143,9 @@ module VagrantPlugins @config.attempts.times do |attempt| if attempt == 0 - @machine.ui.info I18n.t("vagrant.provisioners.chef.running_solo") + @machine.ui.info I18n.t("vagrant.provisioners.chef.running_#{mode}") else - @machine.ui.info I18n.t("vagrant.provisioners.chef.running_solo_again") + @machine.ui.info I18n.t("vagrant.provisioners.chef.running_#{mode}_again") end opts = { error_check: false, elevated: true } diff --git a/plugins/provisioners/chef/provisioner/chef_zero.rb b/plugins/provisioners/chef/provisioner/chef_zero.rb index 8ccae6130..f634bc9a7 100644 --- a/plugins/provisioners/chef/provisioner/chef_zero.rb +++ b/plugins/provisioners/chef/provisioner/chef_zero.rb @@ -22,6 +22,10 @@ module VagrantPlugins share_folders(root_config, "csn", @node_folders) end + def provision + super(:zero) + end + def solo_config super.merge( local_mode: true, diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 3b60c1c76..0af7637fb 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -1809,6 +1809,8 @@ en: running_apply: "Running chef-apply..." running_solo: "Running chef-solo..." running_solo_again: "Running chef-solo again (failed to converge)..." + running_zero: "Running chef-zero..." + running_zero_again: "Running chef-zero again (failed to converge)..." 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