Log chef-zero instead of chef-solo

This commit is contained in:
Seth Vargo 2014-12-28 12:52:54 -05:00
parent 42286a7edf
commit 97d5a6ebfc
3 changed files with 11 additions and 5 deletions

View File

@ -34,7 +34,7 @@ module VagrantPlugins
share_folders(root_config, "cse", @environments_folders) share_folders(root_config, "cse", @environments_folders)
end end
def provision def provision(mode = :solo)
install_chef install_chef
# Verify that the proper shared folders exist. # Verify that the proper shared folders exist.
check = [] check = []
@ -51,7 +51,7 @@ module VagrantPlugins
upload_encrypted_data_bag_secret upload_encrypted_data_bag_secret
setup_json setup_json
setup_solo_config setup_solo_config
run_chef_solo run_chef(mode)
delete_encrypted_data_bag_secret delete_encrypted_data_bag_secret
end end
@ -130,7 +130,7 @@ module VagrantPlugins
} }
end end
def run_chef_solo def run_chef(mode)
if @config.run_list && @config.run_list.empty? if @config.run_list && @config.run_list.empty?
@machine.ui.warn(I18n.t("vagrant.chef_run_list_empty")) @machine.ui.warn(I18n.t("vagrant.chef_run_list_empty"))
end end
@ -143,9 +143,9 @@ module VagrantPlugins
@config.attempts.times do |attempt| @config.attempts.times do |attempt|
if attempt == 0 if attempt == 0
@machine.ui.info I18n.t("vagrant.provisioners.chef.running_solo") @machine.ui.info I18n.t("vagrant.provisioners.chef.running_#{mode}")
else else
@machine.ui.info I18n.t("vagrant.provisioners.chef.running_solo_again") @machine.ui.info I18n.t("vagrant.provisioners.chef.running_#{mode}_again")
end end
opts = { error_check: false, elevated: true } opts = { error_check: false, elevated: true }

View File

@ -22,6 +22,10 @@ module VagrantPlugins
share_folders(root_config, "csn", @node_folders) share_folders(root_config, "csn", @node_folders)
end end
def provision
super(:zero)
end
def solo_config def solo_config
super.merge( super.merge(
local_mode: true, local_mode: true,

View File

@ -1809,6 +1809,8 @@ en:
running_apply: "Running chef-apply..." running_apply: "Running chef-apply..."
running_solo: "Running chef-solo..." running_solo: "Running chef-solo..."
running_solo_again: "Running chef-solo again (failed to converge)..." 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: |- missing_shared_folders: |-
Shared folders that Chef requires are missing on the virtual machine. Shared folders that Chef requires are missing on the virtual machine.
This is usually due to configuration changing after already booting the This is usually due to configuration changing after already booting the