blob: 05bb3e6161c7825cb7935907e5b0ed2c5d11395b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
- hosts: all
tasks:
- name: Execute common-copy role
include_role:
name: common-copy
- name: Ensure executor push directory
file:
path: "{{ zuul.executor.log_root }}/push"
state: directory
delegate_to: localhost
- name: Test pull mode
synchronize:
dest: "{{ zuul.executor.log_root }}/push"
mode: pull
src: "{{ destdir.path }}/"
verify_host: true
environment:
OK: "we can use custom env"
- name: Validate push
stat:
path: "{{ zuul.executor.log_root }}/push/common-file"
register: _push
delegate_to: localhost
- name: Assert push
assert:
that:
- _push.stat.exists
- _push.stat.isreg
- name: Ensure controller pull directory
file:
path: "{{ destdir.path }}/pull"
state: directory
- name: Test push mode
synchronize:
dest: "{{ destdir.path }}/pull/"
mode: push
src: "{{ zuul.executor.log_root }}/push"
rsync_opts:
- "--safe-links"
verify_host: true
- name: Validate pull
stat:
path: "{{ destdir.path }}/pull/push/common-file"
register: _pull
- name: Assert pull
assert:
that:
- _pull.stat.exists
- _pull.stat.isreg
|