community / community.general / 6.6.8 / lookup / bitwarden Retrieve secrets from Bitwarden | "added in version" 5.4.0 of community.general" Authors: Jonathan Lung (@lungj) <lungj@heresjono.com>community.general.bitwarden (6.6.8) — lookup
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
Retrieve secrets from Bitwarden.
- name: "Get 'password' from Bitwarden record named 'a_test'" ansible.builtin.debug: msg: >- {{ lookup('community.general.bitwarden', 'a_test', field='password') }}
- name: "Get 'password' from Bitwarden record with id 'bafba515-af11-47e6-abe3-af1200cd18b2'" ansible.builtin.debug: msg: >- {{ lookup('community.general.bitwarden', 'bafba515-af11-47e6-abe3-af1200cd18b2', search='id', field='password') }}
- name: "Get 'password' from Bitwarden record named 'a_test' from collection" ansible.builtin.debug: msg: >- {{ lookup('community.general.bitwarden', 'a_test', field='password', collection_id='bafba515-af11-47e6-abe3-af1200cd18b2') }}
- name: "Get full Bitwarden record named 'a_test'" ansible.builtin.debug: msg: >- {{ lookup('community.general.bitwarden', 'a_test') }}
- name: "Get custom field 'api_key' from Bitwarden record named 'a_test'" ansible.builtin.debug: msg: >- {{ lookup('community.general.bitwarden', 'a_test', field='api_key') }}
field: description: Field to fetch. Leave unset to fetch whole response. type: str _terms: description: Key(s) to fetch values for from login info. elements: str required: true type: list search: default: name description: Field to retrieve, for example C(name) or C(id). type: str version_added: 5.7.0 version_added_collection: community.general collection_id: description: Collection ID to filter results by collection. Leave unset to skip filtering. type: str version_added: 6.3.0 version_added_collection: community.general
_raw: description: List of requested field or JSON object of list of matches. elements: raw type: list