# Host vars for: minisforum (k3s server) ansible_python_interpreter: /usr/bin/python3.13 # ── pia-gateway ──────────────────────────────────────────────────────────────── # Read directly from the repo-root .env (same PIA_USER/PIA_PASSWORD keys # manifests/media/pia-secret.sh already uses) rather than ansible-vault — # .env is already the established, gitignored, plaintext-at-rest secret # source for this account elsewhere in the repo, and lookups run on the # control node, so this never touches minisforum or gets committed. # playbook_dir is always ansible/playbooks for every playbook in this # repo, so ../../.env resolves to the repo root regardless of which # playbook triggers evaluation of these two vars. pia_user: "{{ lookup('ansible.builtin.file', playbook_dir + '/../../.env') | regex_search('^PIA_USER=(.*)$', '\\1', multiline=True) | first }}" pia_password: "{{ lookup('ansible.builtin.file', playbook_dir + '/../../.env') | regex_search('^PIA_PASSWORD=(.*)$', '\\1', multiline=True) | first }}" # Since the auto-recovery work these two ARE copied to minisforum, into the # root-only /etc/pia-gateway/credentials.env (tasks/controller.yaml, # no_log) — the host must be able to re-register with PIA unattended. See # the role README "Credentials on the host" for the tradeoff and rotation. # # Optional: alert-bridge's shared bearer key so the controller can post # state transitions to Discord. Empty (no ALERT_BRIDGE_API_KEY in .env) # disables delivery; events still go to the journal. pia_alert_bridge_api_key: "{{ (lookup('ansible.builtin.file', playbook_dir + '/../../.env') | regex_search('^ALERT_BRIDGE_API_KEY=(.*)$', '\\1', multiline=True) | default([''], true)) | first }}"