Fix poor variable reference in puppet server. Also colorize output

This commit is contained in:
Mitchell Hashimoto 2012-01-17 21:16:24 -08:00
parent 62f4599f8c
commit 8abada25b9
1 changed files with 7 additions and 2 deletions

View File

@ -44,9 +44,14 @@ module Vagrant
command = "puppetd #{options} --server #{config.puppet_server} --certname #{cn}"
env.ui.info I18n.t("vagrant.provisioners.puppet_server.running_puppetd")
env[:ui].info I18n.t("vagrant.provisioners.puppet_server.running_puppetd")
env[:vm].channel.sudo(command) do |type, data|
env.ui.info(data)
# Output the data with the proper color based on the stream.
color = type == :stdout ? :green : :red
# Note: Be sure to chomp the data to avoid the newlines that the
# Chef outputs.
env[:ui].info(data.chomp, :color => color, :prefix => false)
end
end
end