Fix n8n playbook dry-run failure on 1Password lookups

Shell tasks are skipped in check mode by default, leaving op_item.stdout
empty and breaking from_json in the set_fact. The op item get calls are
read-only, so mark them check_mode: no so dry runs reflect reality.
This commit is contained in:
lorentz 2026-04-21 01:31:55 +00:00
parent 9cc8a68da3
commit d7ee878393

View file

@ -24,6 +24,7 @@
register: op_check register: op_check
failed_when: false failed_when: false
changed_when: false changed_when: false
check_mode: no
environment: environment:
OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}"
@ -33,6 +34,7 @@
shell: | shell: |
op item get "{{ stack_name }}" --vault="Automation" --format json op item get "{{ stack_name }}" --vault="Automation" --format json
register: op_item register: op_item
check_mode: no
environment: environment:
OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}"