2 Commits

Author SHA1 Message Date
Jérémy Dubois 55745e1a62 nagios-nrpe role : change variables name 4 months ago
Jérémy Dubois 8a2111561f Improve PacketFilter role 4 months ago
  1. 10
      roles/nagios-nrpe/defaults/main.yml
  2. 13
      roles/pf/README.md
  3. 9
      roles/pf/defaults/main.yml
  4. 2
      roles/pf/templates/pf.conf.j2

10
roles/nagios-nrpe/defaults/main.yml

@ -1,11 +1,9 @@
---
evolix_trusted_ips: []
additional_trusted_ips: []
# Let's merge evolix_trusted_ips with additional_trusted_ips
nagios_nrpe_default_allowed_hosts: []
nagios_nrpe_additional_allowed_hosts: []
nagios_nrpe_allowed_hosts:
"{{ evolix_trusted_ips | union(additional_trusted_ips) | unique }}"
nagios_nrpe_ldap_dc: "dc=DOMAIN,dc=EXT"
nagios_nrpe_ldap_passwd: LDAP_PASSWD
"{{ nagios_nrpe_default_allowed_hosts
| union(nagios_nrpe_additional_allowed_hosts) | unique }}"
nagios_nrpe_pgsql_passwd: PGSQL_PASSWD
nagios_nrpe_amavis_from: "foobar@{{ ansible_domain }}"

13
roles/pf/README.md

@ -0,0 +1,13 @@
# PacketFilter
Custom configuration of PacketFilter.
## Tasks
Everything is in the `tasks/main.yml` file.
## Available variables
* `pf_trusted_ips` : list of IP trusted for important access (default: all).
The full list of variables (with default values) can be found in `defaults/main.yml`.

9
roles/pf/defaults/main.yml

@ -0,0 +1,9 @@
---
pf_default_trusted_ips: []
pf_additional_trusted_ips: []
# and default to ['0.0.0.0/0'] if the result is still empty
pf_trusted_ips:
"{{ pf_default_trusted_ips | union(pf_additional_trusted_ips)
| unique | join(', ')
| default(['0.0.0.0/0'], true) }}"

2
roles/pf/templates/pf.conf.j2

@ -12,7 +12,7 @@ ext_if="{{ ansible_default_ipv4.device }}"
###########################
# Evolix
table <evolix> { 88.179.18.233, 31.170.9.129, 31.170.8.4 }
table <evolix> { {{ pf_trusted_ips }} }
# Port en entrée
# 2222 = ssh secondaire

Loading…
Cancel
Save