Skip to content

Commit 4c9be83

Browse files
committed
Use sync module instead of rsync command
Change repo sync to use ansible.posix.synchronize to allow more flexability.
1 parent e27fac3 commit 4c9be83

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

roles/reproducer/tasks/push_code.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,12 @@
124124
delegate_to: localhost
125125
when:
126126
- item.src is abs or item.src is not match('.*:.*')
127-
ansible.builtin.command: # noqa: command-instead-of-module
128-
cmd: "rsync -ar {{ item.src }} zuul@controller-0:{{ item.dest }}"
127+
ansible.posix.synchronize:
128+
src: "{{ item.src }}"
129+
dest: "zuul@controller-0:{{ item.dest }}"
130+
archive: true
131+
recursive: true
132+
delete: true
129133
loop: "{{ _cifmw_reproducer_all_repositories }}"
130134
loop_control:
131135
label: "{{ item.src | basename }}"

0 commit comments

Comments
 (0)