Read OP_SERVICE_ACCOUNT_TOKEN from extra-vars, not controller env

Semaphore injects environment secrets as ansible extra-vars, not as
process env vars, so lookup('env','OP_SERVICE_ACCOUNT_TOKEN') resolved
to empty string and the op CLI hung waiting for interactive auth.
Reference the variable directly instead.
This commit is contained in:
lorentz 2026-04-21 01:59:08 +00:00
parent 323616f802
commit 62f28f5c51

View file

@ -30,7 +30,7 @@
become: false become: false
no_log: true no_log: true
environment: environment:
OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" OP_SERVICE_ACCOUNT_TOKEN: "{{ OP_SERVICE_ACCOUNT_TOKEN }}"
# 🔐 Load existing secrets # 🔐 Load existing secrets
- name: Load secrets from 1Password - name: Load secrets from 1Password
@ -44,7 +44,7 @@
become: false become: false
no_log: true no_log: true
environment: environment:
OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" OP_SERVICE_ACCOUNT_TOKEN: "{{ OP_SERVICE_ACCOUNT_TOKEN }}"
- name: Set secrets from 1Password - name: Set secrets from 1Password
when: op_check.rc == 0 when: op_check.rc == 0
@ -84,7 +84,7 @@
"postgres_password={{ n8n_postgres_password }}" \ "postgres_password={{ n8n_postgres_password }}" \
"encryption_key={{ n8n_encryption_key }}" "encryption_key={{ n8n_encryption_key }}"
environment: environment:
OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" OP_SERVICE_ACCOUNT_TOKEN: "{{ OP_SERVICE_ACCOUNT_TOKEN }}"
# 🧱 Infrastructure # 🧱 Infrastructure
- name: Ensure stack directory exists - name: Ensure stack directory exists