From baa8697f5d2492163bf702dd68b720b9df0cabc5 Mon Sep 17 00:00:00 2001 From: Tim Brown Date: Mon, 13 Oct 2014 15:31:11 -0700 Subject: [PATCH] Colorize Ansible output, and don't buffer output. Setting environment variables for the ansible-playbook invocation. ANSIBLE_FORCE_COLOR will ensure output is colorized. PYTHONUNBUFFERED will stream output as Ansible runs, vs getting a big dump of output at the end. --- provisioner/ansible-local/provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/ansible-local/provisioner.go b/provisioner/ansible-local/provisioner.go index 3188b625f..34c4607aa 100644 --- a/provisioner/ansible-local/provisioner.go +++ b/provisioner/ansible-local/provisioner.go @@ -69,7 +69,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { // Defaults if p.config.Command == "" { - p.config.Command = "ansible-playbook" + p.config.Command = "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook" } if p.config.StagingDir == "" {