From 0b29388f1a89a8c21c125bff923d6ef9e2304cca Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Tue, 11 Mar 2025 21:44:32 +0100 Subject: [PATCH] feat: update SSHFS configuration to use explicit plugin path for 1Password lookups --- config/ansible/tasks/servers/sshfs.yml | 7 ++++--- config/ansible/tests/test-onepassword-lookup.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/ansible/tasks/servers/sshfs.yml b/config/ansible/tasks/servers/sshfs.yml index 4cf3e0d..0415102 100644 --- a/config/ansible/tasks/servers/sshfs.yml +++ b/config/ansible/tasks/servers/sshfs.yml @@ -3,9 +3,10 @@ block: - name: SSHFS Details ansible.builtin.set_fact: - sshfs_user: "{{ lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/username') }}" - sshfs_pass: "{{ lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/new_password') }}" - sshfs_host: "{{ lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/host') }}" + # 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_port: 23 remote_path: /mnt/storage-box diff --git a/config/ansible/tests/test-onepassword-lookup.yml b/config/ansible/tests/test-onepassword-lookup.yml index 7db741f..b2dd210 100644 --- a/config/ansible/tests/test-onepassword-lookup.yml +++ b/config/ansible/tests/test-onepassword-lookup.yml @@ -8,7 +8,7 @@ tasks: - name: Test lookup with direct reference ansible.builtin.debug: - msg: "{{ lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/Hoarder/OPENAI_API_KEY') }}" + msg: "{{ lookup('onepassword', 'op://j7nmhqlsjmp2r6umly5t75hzb4/5j5y5axfjr3f3sn5nixb6htg4y/host') }}" - name: Template with lookup ansible.builtin.template: