diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/handlers/main.yml b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/handlers/main.yml index f71280e..7c33ad1 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/handlers/main.yml +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/handlers/main.yml @@ -2,8 +2,10 @@ - name: Reload systemd for the Fluxer stack ansible.builtin.systemd_service: daemon_reload: true + when: not ansible_check_mode - name: Restart the Fluxer stack ansible.builtin.systemd_service: name: "{{ fluxer_stack_service_name }}" state: restarted + when: not ansible_check_mode diff --git a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml index 8408cb2..0259330 100644 --- a/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml +++ b/proxmox/lxc/ct-117-fluxer/ansible/roles/fluxer_stack/tasks/main.yml @@ -29,7 +29,7 @@ group: root mode: "0750" -- name: Fetch the pinned upstream compose file +- name: Fetch the pinned upstream compose file (SHA-256-verifiziert) ansible.builtin.get_url: url: "{{ fluxer_stack_compose_url }}" dest: "{{ fluxer_stack_compose_file }}" @@ -40,6 +40,16 @@ timeout: 60 notify: - Restart the Fluxer stack + # in check mode the stack directory is not created yet, so the fetch is + # only previewed; the real run verifies the checksum + when: not ansible_check_mode + +- name: Note the deferred compose fetch in check mode + ansible.builtin.debug: + msg: >- + check mode: compose fetch ({{ fluxer_stack_compose_url }}, + sha256 {{ fluxer_stack_compose_sha256 }}) is verified on the real run + when: ansible_check_mode - name: Read the pinned compose for the service-name assertions ansible.builtin.slurp: @@ -101,18 +111,21 @@ owner: root group: root mode: "0600" + when: not ansible_check_mode # file is created by the generate task above - name: Read the persisted secrets ansible.builtin.slurp: src: "{{ fluxer_stack_secrets_file }}" register: fluxer_stack_secrets_content no_log: true + when: not ansible_check_mode - name: Expose the secret lines to the .env template ansible.builtin.set_fact: fluxer_stack_secret_lines: >- {{ fluxer_stack_secrets_content.content | b64decode | trim }} no_log: true + when: not ansible_check_mode - name: Render the compose .env (root-only) ansible.builtin.template: @@ -124,6 +137,7 @@ notify: - Restart the Fluxer stack no_log: true + when: not ansible_check_mode - name: Check a pinned image locally ansible.builtin.command: