# Role: gpg

## Description

Install `gpg` and create keys when given in vars.

https://www.gnupg.org/

## Usage

Using in a playbook:

```yaml
- name: Play
  hosts:
    - all
  roles:
    - samuliy.ansible.gpg
  vars:
    ...
```

### Vars

`gpg_bin`:

Path to gpg executable.

`gpg_keys`:

List of keys to install.

The list items must contain fields:

- 'homedir'
- 'user'

Optional fields:

- 'private_key' - Import a private key.
- 'config' - Generate a private key from config.
- 'export' - Export the key to a file.

`gpg_reset`:

Remove gpg homedirs before adding keys.
