# Role: alertmanager

## Description

Install and configure AlertManager for Prometheus alerts.

https://prometheus.io/docs/alerting/latest/alertmanager/

## Usage

Using in a playbook:

```yaml
- name: Play
  gather_facts: true
  gather_subset:
    - distribution
  hosts:
    - all
  roles:
    - samuliy.ansible.alertmanager
  vars:
    ...
```

### Vars

`alertmanager_user`:

User for Alertmanager.

`alertmanager_group`:

Group for Alertmanager.

`alertmanager_config`:

Config for Alertmanager.

`alertmanager_web_config`:

WebConfig for Alertmanager. Used for TLS config.

`alertmanager_service_name`:

Service name.

`alertmanager_environment_file`:

Environment file for the service.

`alertmanager_environment_args`:

Arguments to set into the environment file.

`alertmanager_environment_args_key`:

Key to look for in the environment file.
