tests: hacksmash synchronize test to work

Avoid password typing idiocy.
issue72
David Wilson 6 years ago
parent 43ad23946e
commit 638e473ff1

@ -3,7 +3,22 @@
- name: integration/action/synchronize.yml - name: integration/action/synchronize.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true any_errors_fatal: true
vars:
ansible_user: mitogen__has_sudo_pubkey
ansible_ssh_private_key_file: /tmp/synchronize-action-key
tasks: tasks:
# must copy git file to set proper file mode.
- copy:
dest: /tmp/synchronize-action-key
src: ../../../data/docker/mitogen__has_sudo_pubkey.key
mode: u=rw,go=
connection: local
- file:
path: /tmp/sync-test
state: absent
connection: local
- file: - file:
path: /tmp/sync-test path: /tmp/sync-test
state: directory state: directory
@ -14,12 +29,17 @@
content: "item!" content: "item!"
connection: local connection: local
- file:
path: /tmp/sync-test.out
state: absent
- synchronize: - synchronize:
dest: /tmp/sync-test private_key: /tmp/synchronize-action-key
src: /tmp/sync-test dest: /tmp/sync-test.out
src: /tmp/sync-test/
- slurp: - slurp:
src: /tmp/sync-test/item src: /tmp/sync-test.out/item
register: out register: out
- set_fact: outout="{{out.content|b64decode}}" - set_fact: outout="{{out.content|b64decode}}"

Loading…
Cancel
Save