test: add Ansible playbook for testing 1Password lookup functionality
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
Some checks failed
Nix Format Check / check-format (push) Failing after 38s
This commit is contained in:
parent
0d9d2cf207
commit
d839c81603
22
config/ansible/tests/test-onepassword-lookup.yml
Normal file
22
config/ansible/tests/test-onepassword-lookup.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
- name: Test 1Password Lookup Plugin
|
||||||
|
hosts: localhost
|
||||||
|
connection: local
|
||||||
|
gather_facts: false
|
||||||
|
vars:
|
||||||
|
hoarder_data_dir: /mnt/storage-box/services/hoarder
|
||||||
|
tasks:
|
||||||
|
- name: Test lookup with ref parameter
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('onepassword', ref='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
|
||||||
|
register: op_direct
|
||||||
|
|
||||||
|
- name: Print out the templated file
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('file', '/tmp/docker-compose.yml') }}"
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user