mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
a3f317588d
Signed-off-by: gardar <gardar@users.noreply.github.com>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
---
|
|
- name: Preflight
|
|
ansible.builtin.include_tasks:
|
|
file: preflight.yml
|
|
tags:
|
|
- fail2ban_exporter_install
|
|
- fail2ban_exporter_configure
|
|
- fail2ban_exporter_run
|
|
|
|
- name: Install
|
|
ansible.builtin.include_role:
|
|
name: prometheus.prometheus._common
|
|
tasks_from: install.yml
|
|
vars:
|
|
_common_local_cache_path: "{{ fail2ban_exporter_local_cache_path }}"
|
|
_common_binaries: "{{ _fail2ban_exporter_binaries }}"
|
|
_common_binary_install_dir: "{{ fail2ban_exporter_binary_install_dir }}"
|
|
_common_binary_url: "{{ fail2ban_exporter_binary_url }}"
|
|
_common_checksums_url: "{{ fail2ban_exporter_checksums_url }}"
|
|
_common_system_group: "{{ fail2ban_exporter_system_group }}"
|
|
_common_system_user: "{{ fail2ban_exporter_system_user }}"
|
|
_common_config_dir: "{{ fail2ban_exporter_config_dir }}"
|
|
tags:
|
|
- fail2ban_exporter_install
|
|
|
|
- name: SELinux
|
|
ansible.builtin.include_role:
|
|
name: prometheus.prometheus._common
|
|
tasks_from: selinux.yml
|
|
vars:
|
|
_common_selinux_port: "{{ fail2ban_exporter_web_listen_address | urlsplit('port') }}"
|
|
when: ansible_selinux.status == "enabled"
|
|
tags:
|
|
- fail2ban_exporter_configure
|
|
|
|
- name: Configure
|
|
ansible.builtin.include_role:
|
|
name: prometheus.prometheus._common
|
|
tasks_from: configure.yml
|
|
tags:
|
|
- fail2ban_exporter_configure
|
|
|
|
- name: Ensure fail2ban_exporter is enabled on boot
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
name: fail2ban_exporter
|
|
enabled: true
|
|
state: started
|
|
when:
|
|
- not ansible_check_mode
|
|
tags:
|
|
- fail2ban_exporter_run
|