Commit Graph

5 Commits

Author SHA1 Message Date
Billie Cleek e55c530cc6 add ansible tests for docker builder 2016-12-09 06:31:52 -08:00
Billie Cleek f5ca0de225 provisioner/ansible: assume scp target is file
Assume the scp target is a file instead of a directory. Assuming the scp
target is a file instead of a directory allows uploading files to a node
being provisioned with the ssh communciator using sftp and with the
winrm communicator. It is fully compatible with ansible; ansible
communicators only allow for files (never directories) to be uploaded
(when the copy module is used to upload a directory, ansible walks the
directory and uploads files one at a time).

Update documentation to explain how to provision a Windows image.

Extend tests that use ssh to communicate with the node to include single
files, recursive copies, and content-only recursive copies.

Add test to verify support for the winrm communicator.

Remove the err argument from adapter.scpExec, because it was unused.

Fixes #3911
2016-11-26 14:40:39 -08:00
Billie H. Cleek f760ab2fd8 Make SCP the default for provisioner/ansible
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.
2016-09-11 23:58:31 -07:00
Billie H. Cleek da223b9539 add scp support to ansible provisioner
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.
2016-09-11 23:58:31 -07:00
Billie H. Cleek d745c579f4 add blackbox tests for ansible provisioner
Add bats tests for the ansible provisioner. The tests exercise all
options and the minimal set of options of the provisioner.

Fix the bats tests for the googlecompute builder.
2016-07-29 23:24:09 -07:00