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 <noreply@anthropic.com>
This commit is contained in:
parent
f4d33ac457
commit
cedebad116
1 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue