Fix poor variable reference in puppet server. Also colorize output
This commit is contained in:
parent
62f4599f8c
commit
8abada25b9
|
@ -44,9 +44,14 @@ module Vagrant
|
||||||
|
|
||||||
command = "puppetd #{options} --server #{config.puppet_server} --certname #{cn}"
|
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[: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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue