From a9d3135ddf19bde2f6b9232a5ea171fc15f94557 Mon Sep 17 00:00:00 2001 From: ske087 Date: Fri, 24 Apr 2026 16:11:03 +0300 Subject: [PATCH] fix: kill Prezenta app.py before renaming folder in migrate_to_wmt playbook --- ansible/playbooks/migrate_to_wmt.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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: