diff --git a/roles/sync/files_sync/tasks/sync.yml b/roles/sync/files_sync/tasks/sync.yml index 986e9e32..e2160008 100644 --- a/roles/sync/files_sync/tasks/sync.yml +++ b/roles/sync/files_sync/tasks/sync.yml @@ -12,10 +12,10 @@ ansible.builtin.command: cmd: "rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -aHPv {{ files.source.host }}:{{ files.source.files_dir }}/ {{ files.source.temp_dir }}/{{ files.source.build_id }}/" delegate_to: "localhost" + run_once: true - name: Copy the source files from the deploy server onto the destination server. - ansible.builtin.copy: - src: "{{ files.source.temp_dir }}/{{ files.source.build_id }}/" - dest: "{{ files.target.files_dir }}" - owner: "{{ deploy_user }}" - group: "{{ deploy_user }}" + ansible.builtin.command: + cmd: "rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -aHPv {{ files.source.temp_dir }}/{{ files.source.build_id }}/ {{ ansible_play_hosts[0] }}:{{ files.target.files_dir }}/" + delegate_to: "localhost" + run_once: true