2022-09-22 14:38:42 +00:00
|
|
|
---
|
2022-11-25 09:18:32 +00:00
|
|
|
- name: Preflight
|
|
|
|
ansible.builtin.include_tasks: preflight.yml
|
2022-09-22 14:38:42 +00:00
|
|
|
tags:
|
|
|
|
- alertmanager_install
|
|
|
|
- alertmanager_configure
|
|
|
|
- alertmanager_run
|
|
|
|
|
2022-11-25 09:18:32 +00:00
|
|
|
- name: Install
|
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: install.yml
|
|
|
|
apply:
|
|
|
|
become: true
|
2022-09-22 14:38:42 +00:00
|
|
|
tags:
|
|
|
|
- alertmanager_install
|
|
|
|
|
2022-11-25 09:18:32 +00:00
|
|
|
- name: SELinux
|
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: selinux.yml
|
|
|
|
apply:
|
|
|
|
become: true
|
2022-09-22 14:38:42 +00:00
|
|
|
when: ansible_selinux.status == "enabled"
|
|
|
|
tags:
|
|
|
|
- alertmanager_configure
|
|
|
|
|
2022-11-25 09:18:32 +00:00
|
|
|
- name: Configure
|
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: configure.yml
|
|
|
|
apply:
|
|
|
|
become: true
|
2022-09-22 14:38:42 +00:00
|
|
|
tags:
|
|
|
|
- alertmanager_configure
|
|
|
|
|
2022-09-23 12:07:54 +00:00
|
|
|
- name: Ensure alertmanager service is started and enabled
|
2022-09-22 14:38:42 +00:00
|
|
|
become: true
|
2022-09-23 12:07:54 +00:00
|
|
|
ansible.builtin.systemd:
|
2022-09-22 14:38:42 +00:00
|
|
|
daemon_reload: true
|
|
|
|
name: alertmanager
|
|
|
|
state: started
|
|
|
|
enabled: true
|
|
|
|
tags:
|
|
|
|
- alertmanager_run
|
|
|
|
|
|
|
|
- name: Flush alertmangaer handlers after run.
|
2022-09-23 12:07:54 +00:00
|
|
|
ansible.builtin.meta: flush_handlers
|