append ANSIBLE_HOST_KEY_CHECKING correctly (#3568)
Append the ANSIBLE_HOST_KEY_CHECKING environment variable correctly regardless of whether the template specifies some environment variables.
This commit is contained in:
parent
97772d0dee
commit
49067e732a
@ -312,7 +312,9 @@ func (p *Provisioner) executeAnsible(ui packer.Ui, comm packer.Communicator, pri
|
||||
cmd.Env = os.Environ()
|
||||
if len(envvars) > 0 {
|
||||
cmd.Env = append(cmd.Env, envvars...)
|
||||
} else if !checkHostKey {
|
||||
}
|
||||
|
||||
if !checkHostKey {
|
||||
cmd.Env = append(cmd.Env, "ANSIBLE_HOST_KEY_CHECKING=False")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user