From c51952a68db5b26945b014e857843b77ea2ab6b6 Mon Sep 17 00:00:00 2001 From: jabclab Date: Thu, 26 Sep 2013 10:13:44 +0100 Subject: [PATCH] Resolving #2194 (Ansible buffering output if run as subprocess) --- plugins/provisioners/ansible/provisioner.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/provisioners/ansible/provisioner.rb b/plugins/provisioners/ansible/provisioner.rb index 0fdad491d..71284fe0e 100644 --- a/plugins/provisioners/ansible/provisioner.rb +++ b/plugins/provisioners/ansible/provisioner.rb @@ -41,7 +41,10 @@ module VagrantPlugins command << { :env => { "ANSIBLE_FORCE_COLOR" => "true", - "ANSIBLE_HOST_KEY_CHECKING" => "#{config.host_key_checking}" + "ANSIBLE_HOST_KEY_CHECKING" => "#{config.host_key_checking}", + # Ensure Ansible output isn't buffered so that we receive ouput + # on a task-by-task basis. + "PYTHONUNBUFFERED" => 1 }, :notify => [:stdout, :stderr], :workdir => @machine.env.root_path.to_s