tools: use down+up in deploy handler to pick up code changes

This commit is contained in:
Username
2026-02-18 00:22:48 +01:00
parent d7b004f0ac
commit b6045bd05c

View File

@@ -44,7 +44,7 @@
(sync_result is changed or compose_result is changed)
- name: Check container status
ansible.builtin.raw: "uid=$(id -u {{ ppf_owner }}) && cd {{ ppf_base }} && sudo -u {{ ppf_owner }} XDG_RUNTIME_DIR=/run/user/$uid podman-compose ps"
ansible.builtin.raw: "uid=$(id -u {{ ppf_owner }}) && sudo -u {{ ppf_owner }} bash -c 'export XDG_RUNTIME_DIR=/run/user/'$uid' && cd {{ ppf_base }} && podman-compose ps'"
register: status_result
changed_when: false
@@ -54,5 +54,5 @@
handlers:
- name: restart containers
ansible.builtin.raw: "uid=$(id -u {{ ppf_owner }}) && cd {{ ppf_base }} && sudo -u {{ ppf_owner }} XDG_RUNTIME_DIR=/run/user/$uid podman-compose up -d"
ansible.builtin.raw: "uid=$(id -u {{ ppf_owner }}) && sudo -u {{ ppf_owner }} bash -c 'export XDG_RUNTIME_DIR=/run/user/'$uid' && cd {{ ppf_base }} && podman-compose down && podman-compose up -d'"
when: ppf_restart | bool