Add a new option, `use_sftp` to the ansible provisioner. It's default
value is false; ansible provisioner will use SCP by default.
Refactor to consistently set all configure options for ansible
provisioner in the Prepare step.
Remove incorrect information about `ANSIBLE_HOST_KEY_CHECKING=False`
being set when `ansible_env_vars` is not set in the packer template.
Update BATS tests for the ansible provisioner to actually check that the
fetched directory contains the contents expected. This revealed a
problem with the all_options template that required adding a host to the
hosts list in the test playbook.
Handle running `scp -t` and `scp -f` exec requests in the
ansible-provisioner's SSH
server to allow Ansible to use SCP so that SFTP doesn't have to be
installed on the node.
Update the BATS tests to test the ansible provisioner.
Ansible may produce very long lines which Scanner can not handle. This
replaces the Scanner with a Reader and uses the ReadString method to
read an arbitrary large line from the ansible-playbook stdout pipe.
Ansible 2.0 deprecated ansible_ssh_user, ansible_ssh_port, ansible_ssh_host
instead use ansible_user, ansible_port, and ansible_host in the
inventory file.
Closes#3275
* Clearly separate host signer and user key generation into separate
functions and data structures.
* Remove inaccurate comment about needing to specify both files if
either one is specified.
* Rename parameters for clarity according to their meaning to the
callee.
* Style the code with gofmt.