Commit ed698a0c authored by Markus Frei's avatar Markus Frei
Browse files

minor improvements

parent 9642602b
# How to use the Ansible KeePass Module
# Linuxfabrik KeePass Module for Ansible
## Installation
* We need the PyKeePass module for Python, so install it: `dnf install python-pykeepass`
* This Ansible module needs the PyKeePass Module for Python.
On Fedora, install it using `dnf install python-pykeepass` for example.
* Clone the Linuxfabrik KeePass Module for Ansible into one of those directories using `git@git.linuxfabrik.ch:linuxfabrik/ansible-module-keepass.git`:
- any directory added to the `ANSIBLE_LIBRARY` environment variable (`$ANSIBLE_LIBRARY` takes a colon-separated list like `$PATH`)
- `~/.ansible/plugins/modules/`
- `/usr/share/ansible/plugins/modules/`
## KeePass database
## Create a KeePass Database
Create a new, empty `.kdbx` file using KeePass, KeeWeb or similar. You can either use just a password, just a keyfile, or both.
Create a new, empty `.kdbx` file using KeePass, [KeeWeb](https://keeweb.info/) or similar. You can either use just a password, just a keyfile, or both.
In this example, we use `/tmp/vault.kdbx` with the keyfile `/tmp/vault.key`. (in real life, don't use the `/tmp` dir for this ;-)
In this example, we use `/tmp/vault.kdbx` with `/tmp/vault.key`. In real life, don't use the `/tmp` directory for this of course. ;-)
## Use the module in a playbook
## How to use the Module in a Playbook
The next step in using the Linuxfabrik KeePass Module for Ansible is to consume it with an Ansible playbook.
* Create a playbook in any directory: `$ touch keepass.yml`
* Add the following to the new playbook file:
```yaml
......@@ -63,10 +63,14 @@ The next step in using the Linuxfabrik KeePass Module for Ansible is to consume
msg: "Username: {{ creds.username }}, Password: {{ creds.password }}, New password: {{ creds.changed }}"
```
* Run the playbook and analyze the output: `$ ansible-playbook ./keepass.yml`
* Run the playbook and analyze the output:
`$ ansible-playbook ./keepass.yml`
## Full Documentation
## See the full documentation
You can see the full documentation of the available parameters using
```bash
ansible-doc keepass
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment