refactor: update 1Password lookup syntax for consistency and clarity
Some checks failed
Nix Format Check / check-format (push) Failing after 38s

This commit is contained in:
2025-03-11 21:09:47 +01:00
parent 8eded69aee
commit f7c25a0ed2
5 changed files with 34 additions and 84 deletions

View File

@@ -6,17 +6,16 @@
vars:
hoarder_data_dir: /mnt/storage-box/services/hoarder
tasks:
- name: Test lookup with ref parameter
- name: Test lookup with direct reference
ansible.builtin.debug:
msg: "{{ lookup('onepassword', ref='op://j7nmhqlsjmp2r6umly5t75hzb4/Hoarder/OPENAI_API_KEY') }}"
msg: "{{ lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/Hoarder/OPENAI_API_KEY') }}"
- name: Template with lookup
ansible.builtin.template:
src: ../tasks/servers/services/hoarder/docker-compose.yml.j2
dest: /tmp/docker-compose.yml
src: ../tasks/servers/services/hoarder/dotenv.j2
dest: /tmp/.env
register: op_direct
- name: Print out the templated file
ansible.builtin.debug:
msg: "{{ lookup('file', '/tmp/docker-compose.yml') }}"
msg: "{{ lookup('file', '/tmp/.env') }}"