From 88f38e26677b9be964aa1fab0b5b07123383f691 Mon Sep 17 00:00:00 2001 From: gemini Date: Fri, 13 Mar 2026 12:12:20 +0100 Subject: [PATCH] fix: Use idempotent command for moving files and directories --- playbooks/organize_home.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/organize_home.yml b/playbooks/organize_home.yml index b6b6403..1a3f5be 100644 --- a/playbooks/organize_home.yml +++ b/playbooks/organize_home.yml @@ -81,8 +81,8 @@ - { src: '.myclirc', dest: '.config/mycli/myclirc' } - { src: '.tig_history', dest: '.local/share/tig/history' } - - name: Move file or directory - command: "mv {{ home_dir }}/{{ item.item.src }} {{ home_dir }}/{{ item.item.dest }}" + - name: Move file or directory using shell for idempotency + shell: "cp -aT '{{ home_dir }}/{{ item.item.src }}' '{{ home_dir }}/{{ item.item.dest }}' && rm -rf '{{ home_dir }}/{{ item.item.src }}'" when: item.stat.exists loop: "{{ stat_result.results }}" loop_control: