feat: update 1Password lookup syntax in Ansible tasks and documentation for improved clarity and usage
Some checks failed
Nix Format Check / check-format (push) Failing after 38s

This commit is contained in:
2025-03-11 21:17:05 +01:00
parent 10ac4091e6
commit a3b735f373
3 changed files with 54 additions and 16 deletions

View File

@@ -5,21 +5,7 @@
This Ansible configuration includes a custom lookup plugin for fetching secrets from 1Password.
The 1Password CLI must be installed and authenticated on the machine running Ansible.
### Usage
```yaml
# Simple password lookup
password: "{{ lookup('onepassword', 'item-name') }}"
# Fetch specific field
api_key: "{{ lookup('onepassword', 'item-name', field='api_key') }}"
# Fetch from specific vault (using vault ID)
database_password: "{{ lookup('onepassword', 'database', field='password', vault='j7nmhqlsjmp2r6umly5t75hzb4') }}"
# Fetch a field without revealing it (for non-password fields)
note: "{{ lookup('onepassword', 'item-name', field='notes', reveal=false) }}"
```
See [1Password Integration Readme](plugins/lookup/README.md)
### Prerequisites