packer-cn/provisioner/ansible
Aidan Feldman b894c925d1
make user retrieval for Ansible provisioner more robust
Previously, the Ansible provisioner would look for the username from the
`USER` environment variable. Unfortunately, this is not always set -
particularly in Docker containers. It's very confusing to understand why
the error is happening.

Switched to using Go's built-in `os/user` package for retrieving the
current username. @rickard-von-essen had done this in 7369841, but
moved away from it in d59844f because, at the time, it wasn't possible
to use that library with cross-compilation. This was fixed in Go in

795e712b72
2018-01-03 02:52:41 -05:00
..
test-fixtures move packer to hashicorp 2017-04-04 13:39:01 -07:00
adapter.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
adapter_test.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
provisioner.go make user retrieval for Ansible provisioner more robust 2018-01-03 02:52:41 -05:00
provisioner_test.go make user retrieval for Ansible provisioner more robust 2018-01-03 02:52:41 -05:00
scp.go move packer to hashicorp 2017-04-04 13:39:01 -07:00