From f823725e53a722618bf70ddac00b603b8d607997 Mon Sep 17 00:00:00 2001 From: Rickard von Essen Date: Fri, 26 Feb 2016 20:49:37 +0100 Subject: [PATCH] Ansible: os.Environ() should always be passed to the ansible command. Fixes GH-3271 Regression introduced in GH-3203 --- provisioner/ansible/provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/ansible/provisioner.go b/provisioner/ansible/provisioner.go index 8d8760da3..7fa93f997 100644 --- a/provisioner/ansible/provisioner.go +++ b/provisioner/ansible/provisioner.go @@ -262,8 +262,8 @@ func (p *Provisioner) executeAnsible(ui packer.Ui, comm packer.Communicator, pri cmd := exec.Command(p.config.Command, args...) + cmd.Env = os.Environ() if len(envvars) > 0 { - cmd.Env = os.Environ() cmd.Env = append(cmd.Env, envvars...) } else if !checkHostKey { cmd.Env = append(cmd.Env, "ANSIBLE_HOST_KEY_CHECKING=False")