Enable Ansible color output

This commit is contained in:
Collin Allen 2013-04-04 11:31:27 -07:00
parent b52d4dcd58
commit 2aa96fc550
1 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,10 @@ module VagrantPlugins
command = (%w(ansible-playbook) << options << config.playbook).flatten
# Write stdout and stderr data, since it's the regular Ansible output
command << { :notify => [:stdout, :stderr] }
command << {
:env => { "ANSIBLE_FORCE_COLOR" => "true" },
:notify => [:stdout, :stderr]
}
Vagrant::Util::Subprocess.execute(*command) do |type, data|
puts "#{data}" if type == :stdout || type == :stderr
yield type, data if block_given?