mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-29 15:20:17 +00:00
945f39366c
* feat: Add fail2ban_exporter role --------- Signed-off-by: anviar <oleg.kluchkin+github@gmail.com>
19 lines
600 B
YAML
19 lines
600 B
YAML
---
|
|
- name: Copy the fail2ban_exporter systemd service file
|
|
ansible.builtin.template:
|
|
src: fail2ban_exporter.service.j2
|
|
dest: /etc/systemd/system/fail2ban_exporter.service
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart fail2ban_exporter
|
|
|
|
- name: Allow fail2ban_exporter port in SELinux on RedHat OS family
|
|
community.general.seport:
|
|
ports: "{{ fail2ban_exporter_web_listen_address.split(':')[-1] }}"
|
|
proto: tcp
|
|
setype: http_port_t
|
|
state: present
|
|
when:
|
|
- ansible_version.full is version_compare('2.4', '>=')
|
|
- ansible_selinux.status == "enabled"
|