From cedebad1164fee2a5221380682901b570123425b Mon Sep 17 00:00:00 2001 From: Lorentz Date: Tue, 7 Apr 2026 14:08:16 -0400 Subject: [PATCH] Fix planka.yml secrets tasks skipped in check mode Add `when: not ansible_check_mode` to the slurp and set_fact tasks so that dry runs don't fail when .secrets hasn't been created yet. Co-Authored-By: Claude Sonnet 4.6 --- playbooks/planka.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbooks/planka.yml b/playbooks/planka.yml index 33d6e64..ba564e0 100644 --- a/playbooks/planka.yml +++ b/playbooks/planka.yml @@ -78,11 +78,13 @@ ansible.builtin.slurp: src: "{{ planka_stack_dir }}/.secrets" register: _secrets_file + when: not ansible_check_mode - name: Parse secret values ansible.builtin.set_fact: planka_secret_key: "{{ (_secrets_file.content | b64decode).split('\n') | select('match', '^SECRET_KEY=') | first | regex_replace('^SECRET_KEY=', '') }}" planka_access_token: "{{ (_secrets_file.content | b64decode).split('\n') | select('match', '^INTERNAL_ACCESS_TOKEN=') | first | regex_replace('^INTERNAL_ACCESS_TOKEN=', '') }}" + when: not ansible_check_mode - name: Deploy compose.yaml ansible.builtin.template: