feat: implement custom 1Password lookup plugin and update references in Ansible tasks
Some checks failed
Nix Format Check / check-format (push) Failing after 38s

This commit is contained in:
2025-03-11 21:50:40 +01:00
parent 0b29388f1a
commit 22bbda6b19
6 changed files with 23 additions and 19 deletions

View File

@@ -1,12 +1,16 @@
---
- name: Configure SSHFS
block:
- name: SSHFS Details
- name: Debug which plugin is being used
ansible.builtin.debug:
msg: "Using lookup plugins from: {{ lookup('pipe', 'ansible-config dump | grep DEFAULT_LOOKUP_PLUGIN_PATH') }}"
- name: Get SSHFS credentials via local lookup
delegate_to: localhost
ansible.builtin.set_fact:
# Use lookup with explicit plugin path to ensure our custom plugin is used
sshfs_user: "{{ lookup('file', lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/username')) }}"
sshfs_pass: "{{ lookup('file', lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/new_password')) }}"
sshfs_host: "{{ lookup('file', lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/host')) }}"
sshfs_user: "{{ lookup('my_1password', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/username') }}"
sshfs_pass: "{{ lookup('my_1password', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/new_password') }}"
sshfs_host: "{{ lookup('my_1password', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/host') }}"
sshfs_port: 23
remote_path: /mnt/storage-box