2021-05-29 11:45:35 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Allow prometheus to bind to port in SELinux
|
|
|
|
seport:
|
2021-05-29 13:02:57 +00:00
|
|
|
ports: "{{ prometheus_web_bind_port }}"
|
2021-05-29 11:45:35 +00:00
|
|
|
proto: tcp
|
|
|
|
setype: http_port_t
|
|
|
|
state: present
|
|
|
|
when:
|
|
|
|
- ansible_version.full is version('2.4', '>=')
|
|
|
|
- ansible_selinux.status == "enabled"
|
|
|
|
become: True
|
|
|
|
become_user: root
|