github.com/StackPointCloud/packer@v0.10.2-0.20180716202532-b28098e0f79b/test/fixtures/provisioner-ansible/playbook.yml (about)

     1  ---
     2  - hosts: default:packer-test
     3    gather_facts: no
     4    tasks:
     5      - name: touch
     6        raw: touch /tmp/ansible-raw-test
     7      - name: raw test
     8        raw: date
     9      - name: command test
    10        command: echo "the command module"
    11      - name: prepare remote directory
    12        command: mkdir /tmp/remote-dir
    13        args:
    14          creates: /tmp/remote-dir
    15      - name: transfer file.txt
    16        copy: src=dir/file.txt dest=/tmp/remote-dir/file.txt
    17      - name: fetch file.text
    18        fetch: src=/tmp/remote-dir/file.txt dest=fetched-dir validate=yes fail_on_missing=yes
    19      - name: copy contents of directory
    20        copy: src=dir/contents-only/ dest=/tmp/remote-dir
    21      - name: fetch contents of directory
    22        fetch: src=/tmp/remote-dir/file.txt dest="fetched-dir/{{ inventory_hostname }}/tmp/remote-dir/contents-only/" flat=yes validate=yes fail_on_missing=yes
    23      - name: copy directory recursively
    24        copy: src=dir/subdir dest=/tmp/remote-dir
    25      - name: fetch recursively copied directory
    26        fetch: src=/tmp/remote-dir/subdir/file.txt dest=fetched-dir validate=yes fail_on_missing=yes
    27      - copy: src=largish-file.txt dest=/tmp/largish-file.txt