ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
818 stars 1.5k forks source link

Add support to Bitwarden Lookup for filtering results by collection id #5849

Open psalkowski opened 1 year ago

psalkowski commented 1 year ago

Summary

Bitwarden allow to use collections for storing data. In some cases, to simplify CI/CD process with ansible, users may setup collections per environment (like dev, staging, production). They will use the same names for vault items, but stores in different collections. At the end, in CI/CD you can setup one ENV variable that mention the collection id and pass it to ansible. Otherwise, you will have to have unique vault item names.

Of course collection id should be optional.

Issue Type

Feature Idea

Component Name

lookup/bitwarden

Additional Information

- name: "Get 'password' from Bitwarden record named 'a_test' from collection "
  ansible.builtin.debug:
    msg: >-
      {{ lookup('community.general.bitwarden', 'a_test', field='password', collectionId='bafba515-af11-47e6-abe3-af1200cd18b2') }}

Code of Conduct

ansibullbot commented 1 year ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 1 year ago

cc @lungj click here for bot help