From 62f28f5c51a8b906a42c2bc07150455f8053af03 Mon Sep 17 00:00:00 2001 From: lorentz Date: Tue, 21 Apr 2026 01:59:08 +0000 Subject: [PATCH] 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. --- playbooks/n8n.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/n8n.yml b/playbooks/n8n.yml index 20ce86c..f8065ae 100644 --- a/playbooks/n8n.yml +++ b/playbooks/n8n.yml @@ -30,7 +30,7 @@ become: false no_log: true environment: - OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" + OP_SERVICE_ACCOUNT_TOKEN: "{{ OP_SERVICE_ACCOUNT_TOKEN }}" # 🔐 Load existing secrets - name: Load secrets from 1Password @@ -44,7 +44,7 @@ become: false no_log: true environment: - OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" + OP_SERVICE_ACCOUNT_TOKEN: "{{ OP_SERVICE_ACCOUNT_TOKEN }}" - name: Set secrets from 1Password when: op_check.rc == 0 @@ -84,7 +84,7 @@ "postgres_password={{ n8n_postgres_password }}" \ "encryption_key={{ n8n_encryption_key }}" environment: - OP_SERVICE_ACCOUNT_TOKEN: "{{ lookup('env','OP_SERVICE_ACCOUNT_TOKEN') }}" + OP_SERVICE_ACCOUNT_TOKEN: "{{ OP_SERVICE_ACCOUNT_TOKEN }}" # 🧱 Infrastructure - name: Ensure stack directory exists