fix arg order

This commit is contained in:
Lane, Larry 2020-05-21 21:15:13 -05:00
parent 688ed63edf
commit e6670fc4a0

View file

@ -579,13 +579,14 @@ func (p *Provisioner) createCmdArgs(httpAddr, inventory, playbook, privKeyFile s
args = append(args, "--ssh-extra-args", "-o IdentitiesOnly=yes")
}
args = append(args, "-i", inventory, playbook)
args = append(args, p.config.ExtraArguments...)
if len(p.config.AnsibleEnvVars) > 0 {
envVars = append(envVars, p.config.AnsibleEnvVars...)
}
// This must be the last arg appended to args
args = append(args, "-i", inventory, playbook)
return args, envVars
}