All Projects → c0sco → ansible-modules-bitwarden

c0sco / ansible-modules-bitwarden

Licence: GPL-3.0 license
Bitwarden integrations for Ansible

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ansible-modules-bitwarden

Browser
The browser extension vault (Chrome, Firefox, Opera, Edge, Safari, & more).
Stars: ✭ 3,305 (+3492.39%)
Mutual labels:  bitwarden
aruba-ansible-modules
Aruba Ansible Modules
Stars: ✭ 66 (-28.26%)
Mutual labels:  ansible-modules
BitwardenToChromePasswordConverter
A simple console app that converts BitWarden .csv password files to Chrome/Chromium .csv files for password import.
Stars: ✭ 33 (-64.13%)
Mutual labels:  bitwarden
Ansible-VMware-Workstation-Fusion-Pro-Modules
Ansible meet VMware Workstation/Fusion Pro
Stars: ✭ 41 (-55.43%)
Mutual labels:  ansible-modules
ansible-cvp
Ansible modules for Arista CloudVision
Stars: ✭ 44 (-52.17%)
Mutual labels:  ansible-modules
bitprint
🔐 Print your Bitwarden vault.
Stars: ✭ 37 (-59.78%)
Mutual labels:  bitwarden
Bitbetter
Modify bit warden to provide my own licensing for self hosting
Stars: ✭ 220 (+139.13%)
Mutual labels:  bitwarden
home-assistant-addons
Alex's Home Assistant Add-ons
Stars: ✭ 28 (-69.57%)
Mutual labels:  bitwarden
ansible-kubernetes-module
Module for ansible to setup kubernetes objects
Stars: ✭ 27 (-70.65%)
Mutual labels:  ansible-modules
nautobot-ansible
Ansible Collection for managing Nautobot
Stars: ✭ 26 (-71.74%)
Mutual labels:  ansible-modules
ansible.pcs-modules-2
Ansible modules for interacting with pacemaker clusters (2nd generation)
Stars: ✭ 26 (-71.74%)
Mutual labels:  ansible-modules
ansible
介绍用 golang 编写 Ansible 插件
Stars: ✭ 15 (-83.7%)
Mutual labels:  ansible-modules
addon-bitwarden
Vaultwarden (Bitwarden) - Home Assistant Community Add-ons
Stars: ✭ 102 (+10.87%)
Mutual labels:  bitwarden
ansible fetch terraform backend outputs
Ansible module that pulls output dictionary from Terraform tfstate files from s3 backend.
Stars: ✭ 27 (-70.65%)
Mutual labels:  ansible-modules
hashi-homelab
Hashicorp Homelab is a collection of nomad recipes related to several Open Source projects that I use on my own nomad + consul + vault + Intel Nuc cluster.
Stars: ✭ 178 (+93.48%)
Mutual labels:  bitwarden
Desktop
The desktop vault (Windows, macOS, & Linux).
Stars: ✭ 3,224 (+3404.35%)
Mutual labels:  bitwarden
ulauncher-bitwarden
Ulauncher extension to access Bitwarden vaults
Stars: ✭ 26 (-71.74%)
Mutual labels:  bitwarden
ovirt-ansible-collection
Ansible collection with official oVirt modules and roles
Stars: ✭ 53 (-42.39%)
Mutual labels:  ansible-modules
Wristkey
A free and open-source offline authenticator app for Wear OS.
Stars: ✭ 65 (-29.35%)
Mutual labels:  bitwarden
ansible-palybooks
Ansible Palybooks Written and Published by www.server-computer.com. NO WARRANTY for any damages and loss of data.
Stars: ✭ 24 (-73.91%)
Mutual labels:  ansible-modules

ansible-modules-bitwarden

Bitwarden integration for Ansible.

Installation

The easiest way to install this lookup plugin is to use the ansible-galaxy command:

ansible-galaxy install git+https://github.com/c0sco/ansible-modules-bitwarden

This will place the ansible-modules-bitwarden role into $HOME/.ansible/roles, where it will be available to all playbooks you run on your system.

Lookup plugin

To use this plugin, you will need to activate it by including the role in your play. For example:

- hosts: localhost
  roles:
    - ansible-modules-bitwarden

Use Ansible's lookup() function with the bitwarden argument, followed by the items you want to retrieve. The default field is password, but any other field can be specified using the field named argument. If you need to specify the path to the Bitwarden CLI binary, use the path named argument.

Examples

Get a single password

# Get password for Google
- debug:
    msg: {{ lookup('bitwarden', 'Google') }}

The above might result in:

TASK [debug] *********************************************************
ok: [localhost] => {
    "msg": "mysecret"
    }

Get a single username

# Get username for Google
- debug:
    msg: {{ lookup('bitwarden', 'Google', field='username') }}

The above might result in:

TASK [debug] *********************************************************
ok: [localhost] => {
    "msg": "alice"
    }

See all available fields

# Get all available fields for an entry
- debug:
    msg: {{ lookup('bitwarden', 'Google', field='item') }}

The above might result in:

TASK [debug] *********************************************************
ok: [localhost] => {
    "msg": {
        "favorite": false,
        "fields": [
            {
                "name": "mycustomfield",
                "type": 0,
                "value": "the value of my custom field"
            }
        ],
        "folderId": null,
        "id": "12345678-0123-4321-0000-a97001342c31",
        "login": {
            "password": "mysecret",
            "passwordRevisionDate": null,
            "totp": null,
            "username": "alice"
        },
        "name": "Google",
        "notes": null,
        "object": "item",
        "organizationId": "87654321-1234-9876-0000-a96800ed2b47",
        "revisionDate": "2018-10-19T19:20:17.923Z",
        "type": 1
    }
}

Get the value of a custom field

# Get the value of a custom field
- debug:
    msg: {{ lookup('bitwarden', 'Google', field='mycustomfield', custom_field=true) }}

The above might result in:

TASK [debug] *********************************************************
ok: [localhost] => {
    "msg": "the value of my custom field"
    }

download attachments files

# Get the value of a custom field
- debug:
    msg: {{ lookup('bitwarden', 'privateKey.pem',  itemid='123456-1234-1234-abbf-60c345aaa3e', attachments=true ) }}

Optional parameters - output='/ansible/publicKey.pem'

The above might result in:

TASK [debug] *********************************************************
ok: [localhost] => {
    "msg": "Saved /publicKey.pem"
    }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].