Skip to content

Commit 14c8001

Browse files
committed
Fix sync_files to use synced work directory for remote connections
The sync_files task was failing on remote connections because it used ansible.posix.synchronize with delegate_to localhost, trying to rsync from paths that don't exist on the controller. Follow the same pattern as static_manifest.yml by checking if the source exists in the synced _work_dir and using remote_src conditionally with ansible.builtin.copy. Assisted-By: Claude (claude-4.5-sonnet) Signed-off-by: Harald Jensås <hjensas@redhat.com>
1 parent 913b24f commit 14c8001

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

roles/hotloop/tasks/sync_files.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
remote_src: "{{ _synced_src_stat.stat.exists | default(false) }}"
3030
src: >-
3131
{{
32-
[_work_dir, item.sync_files.src, ''] | ansible.builtin.path_join
32+
[_work_dir, item.sync_files.src] | ansible.builtin.path_join
3333
if _synced_src_stat.stat.exists | default(false)
34-
else [item.sync_files.src, ''] | ansible.builtin.path_join
34+
else item.sync_files.src
3535
}}
36-
dest: "{{ [item.sync_files.dest, ''] | ansible.builtin.path_join }}"
36+
dest: "{{ item.sync_files.dest }}"
3737
mode: preserve

0 commit comments

Comments
 (0)