Assign puppet command to a variable for later use

This commit is contained in:
Mitchell Hashimoto 2011-01-12 23:27:33 -08:00
parent a8bd6f7682
commit fea6c1cf60
1 changed files with 3 additions and 1 deletions

View File

@ -70,10 +70,12 @@ module Vagrant
options << @manifest
options = options.join(" ")
command = "sudo -i 'cd #{config.pp_path}; puppet #{options}'"
env.ui.info I18n.t("vagrant.provisioners.puppet.running_puppet")
vm.ssh.execute do |ssh|
ssh.exec! "sudo -i 'cd #{config.pp_path}; puppet #{options}'" do |ch, type, data|
ssh.exec! command do |ch, type, data|
if type == :exit_status
ssh.check_exit_status(data, command)
else