From c2d67f5498ef89c4d60af6c4ec4d4128f238d0e4 Mon Sep 17 00:00:00 2001 From: "martin.fencl" Date: Wed, 10 Dec 2025 12:31:17 +0100 Subject: [PATCH] edit --- update_immich.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/update_immich.yml b/update_immich.yml index db9b74f..e91b970 100644 --- a/update_immich.yml +++ b/update_immich.yml @@ -60,7 +60,7 @@ ansible.builtin.command: argv: - sshpass - - -e # read password from SSHPASS environment + - -e - ssh - -o - StrictHostKeyChecking=no @@ -71,14 +71,15 @@ - -lc - "{{ ('sudo ' if use_sudo else '') + item }}" environment: - SSHPASS: "{{ vm_pass }}" # supply password via environment + SSHPASS: "{{ vm_pass }}" loop: "{{ immich_commands }}" loop_control: - index_var: idx # capture loop index - label: "cmd-{{ idx }}" # avoid printing full command in (item=...) line + index_var: idx + label: "cmd-{{ idx }}" register: immich_cmds changed_when: false - no_log: "{{ DEBUG == 0 }}" # hide outputs and env when not debugging + no_log: "{{ DEBUG == 0 }}" + run_once: true # <<< přidat - name: Show outputs for each Immich command ansible.builtin.debug: @@ -92,7 +93,7 @@ loop: "{{ immich_cmds.results }}" when: DEBUG == 1 - - name: Fail play if any Immich command failed # also hide item label + - name: Fail play if any Immich command failed ansible.builtin.assert: that: "item.rc == 0" fail_msg: "Immich update failed on VM: {{ item.item }} (rc={{ item.rc }})" @@ -101,6 +102,7 @@ loop_control: index_var: idx label: "cmd-{{ idx }}" + run_once: true # ------------------------- # Readiness checks (controller first, then VM fallback)