diff --git a/ansible/playbooks/migrate_to_wmt.yml b/ansible/playbooks/migrate_to_wmt.yml index 7c46f7a..c329531 100644 --- a/ansible/playbooks/migrate_to_wmt.yml +++ b/ansible/playbooks/migrate_to_wmt.yml @@ -94,7 +94,16 @@ debug: msg: "{{ wayfire_check.stdout }}" - # ── 7. Rename Prezenta → Prezenta_Old_Data ──────────────────────────── + # ── 7. Kill any running Prezenta app.py before renaming ────────────── + - name: Kill any process running from Prezenta app.py + shell: pkill -f "Desktop/Prezenta/app.py" || true + changed_when: false + + - name: Wait a moment for the process to terminate + wait_for: + timeout: 3 + + # ── 8. Rename Prezenta → Prezenta_Old_Data ─────────────────────────── # - name: Check if Prezenta folder exists stat: path: /home/pi/Desktop/Prezenta @@ -116,7 +125,7 @@ msg: "⚠ Prezenta_Old_Data already exists — rename skipped to avoid overwrite." when: prezenta_old_stat.stat.exists - # ── 8. Reboot ───────────────────────────────────────────────────────── + # ── 9. Reboot ───────────────────────────────────────────────────────── - name: Reboot host to apply all changes become: true reboot: