ansible / ansible.builtin / v2.6.10 / lookup / onepassword fetch field values from 1Password | "added in version" 2.6 of ansible.builtin" Authors: Scott Buchanan <sbuchanan@ri.pn>, Andrew Zenk <azenk@umn.edu> preview | supported by communityansible.builtin.onepassword (v2.6.10) — lookup
pip
Install with pip install ansible==2.6.10
onepassword wraps the C(op) command line utility to fetch specific field values from 1Password
- name: "retrieve password for KITT" debug: msg: "{{ lookup('onepassword', 'KITT') }}"
- name: "retrieve password for Wintermute" debug: msg: "{{ lookup('onepassword', 'Tessier-Ashpool', section='Wintermute') }}"
- name: "retrieve username for HAL" debug: msg: "{{ lookup('onepassword', 'HAL 9000', field='username', vault='Discovery') }}"
field: default: password description: field to return from each matching item (case-insensitive) vault: default: None description: vault containing the item to retrieve (case-insensitive); if absent will search all vaults _terms: description: identifier(s) (UUID, name or domain; case-insensitive) of item(s) to retrieve required: true section: default: None description: item section containing the field to retrieve (case-insensitive); if absent will return first match from any section
_raw: description: field data requested