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

18 lines
721 B
YAML

---
- hosts: default:packer-test
gather_facts: no
tasks:
#- debug: msg="testing regular modules that function with Windows: raw, fetch, slurp, setup"
- name: raw test
raw: date /t
- debug: msg="testing windows modules"
#- win_file: path=tmp/remote-dir state=directory
#- name: win_shell test
#win_shell: date /t
- name: win_copy test
win_copy: src=dir/file.txt dest=file.txt
#- win_copy: src=dir/file.txt dest=/tmp/remote-dir/file.txt
#- fetch: src=/tmp/remote-dir/file.txt dest=fetched-dir validate=yes fail_on_missing=yes
#- win_copy: src=largish-file.txt dest=/tmp/largish-file.txt
- debug: msg="packer does not support downloading from windows"