ansible_mlp
An Ansible collection of Ansible Modules and Lookup Plugins (MLP) from Linuxfabrik.
-
Ansible Bitwarden Item Lookup Plugin
Returns a password item from Bitwarden. If no password item is found, a new item is created. Have a look at the source code or useansible-doc --module-path ansible_mlp/plugins/lookup/ bitwarden_item
for more details. -
Ansible Keepass Lookup Plugin
Returns a password item from a KeePass database file. If no password item is found, a new item is created. Have a look at the source code or useansible-doc --module-path ansible_mlp/plugins/lookup/ keepass
for more details.
Installation
To install the latest stable release:
ansible-galaxy collection install linuxfabrik.ansible_mlp
To install the latest development version:
# via HTTPS
ansible-galaxy collection install git+https://github.com/linuxfabrik/ansible_mlp.git
# via SSH
ansible-galaxy collection install [email protected]:linuxfabrik/ansible_mlp.git
Requirements
- Depends on the used module or lookup plugin.
Role Variables
- None
Dependencies
- None
Example Playbook
- name: 'Example Playbook showing how the Ansible Modules and Lookup Plugins from Linuxfabrik work'
hosts: 'localhost'
connection: 'local'
tasks:
- name: 'Lookup in Bitwarden'
ansible.builtin.debug:
msg: "{{ lookup('linuxfabrik.ansible_mlp.bitwarden_item',
{
'organization_id': '91f07a34-980b-4a08-9033-b5b0accd3a70',
'collection_ids': [
'db2cf0c4-a7a3-4819-911c-5a02a2fdd23b',
],
'hostname': 'app4711',
'purpose': 'MariaDB',
'username': 'mariadb-admin',
},
) }}"
- name: 'Lookup in a KeePass database file'
ansible.builtin.debug:
msg: "{{ lookup('keepass',
{
'name': 'Mail-Account [email protected]',
},
{
'hostname': 'app4711',
'purpose': 'MariaDB',
'username': 'mariadb-admin',
},
database='/path/to/my.kdbx',
keyfile='/path/to/my.key',
password='keepass-passwd',
) }}"
License
The Unlicense, see LICENSE file.