ansible-collection-prometheus/roles/alertmanager/tasks/main.yml
gardar d05e3c23b5
refactor(alertmanager): delegate common tasks to _common role
Signed-off-by: gardar <gardar@users.noreply.github.com>
2024-10-15 17:01:13 +00:00

49 lines
1.4 KiB
YAML

---
- name: Preflight
ansible.builtin.include_tasks:
file: preflight.yml
tags:
- alertmanager
- install
- configure
- alertmanager_install
- alertmanager_configure
- name: Install
ansible.builtin.include_role:
name: prometheus.prometheus._common
tasks_from: install.yml
vars:
_common_local_cache_path: "{{ alertmanager_local_cache_path }}"
_common_binaries: "{{ _alertmanager_binaries }}"
_common_binary_install_dir: "{{ alertmanager_binary_install_dir }}"
_common_binary_url: "{{ alertmanager_binary_url }}"
_common_checksums_url: "{{ alertmanager_checksums_url }}"
_common_system_group: "{{ alertmanager_system_group }}"
_common_system_user: "{{ alertmanager_system_user }}"
_common_config_dir: "{{ alertmanager_config_dir }}"
_common_binary_unarchive_opts: ['--strip-components=1']
tags:
- alertmanager
- install
- alertmanager_install
- name: SELinux
ansible.builtin.include_role:
name: prometheus.prometheus._common
tasks_from: selinux.yml
vars:
_common_selinux_port: "{{ alertmanager_web_listen_address | urlsplit('port') }}"
when: ansible_selinux.status == "enabled"
tags:
- alertmanager
- configure
- alertmanager_configure
- name: Configure
ansible.builtin.include_tasks:
file: configure.yml
tags:
- alertmanager
- configure
- alertmanager_configure