Robert Kaussow
ffe27507d0
All checks were successful
continuous-integration/drone/push Build is passing
37 lines
977 B
YAML
37 lines
977 B
YAML
---
|
|
- name: Set current Alertmanager version
|
|
set_fact:
|
|
alertmanager_current_version: "{{ (ansible_local.alertmanager | default (dict(version='0.0.0')))['version'] }}"
|
|
|
|
- debug:
|
|
msg: Current version is '{{ alertmanager_current_version }}'
|
|
|
|
- block:
|
|
- name: Create group '{{ alertmanager_group }}'
|
|
group:
|
|
name: "{{ alertmanager_group }}"
|
|
state: present
|
|
|
|
- name: Create user '{{ alertmanager_user }}'
|
|
user:
|
|
comment: Alertmanager
|
|
name: "{{ alertmanager_user }}"
|
|
home: "{{ alertmanager_user_home }}"
|
|
group: "{{ alertmanager_group }}"
|
|
groups: "{{ alertmanager_extra_groups | join(',') }}"
|
|
|
|
- name: Install dependencies
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop:
|
|
- "{{ alertmanager_packages }}"
|
|
|
|
- name: Setup local facts
|
|
file:
|
|
path: /etc/ansible/facts.d
|
|
state: directory
|
|
mode: 0755
|
|
become: True
|
|
become_user: root
|