The firewalld rule is optional.

This commit is contained in:
Andrea Dell'Amico 2021-07-22 18:16:06 +02:00
parent ebd4f42452
commit 4d4d44c9eb
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 4 additions and 2 deletions

View File

@ -10,3 +10,5 @@ ntp_define_servers_pool: False
ntp_servers_pool: [] ntp_servers_pool: []
# - x.y.z.w # - x.y.z.w
# - w.y.z.x # - w.y.z.x
ntp_enable_default_firewalld_rule: 'enabled'

View File

@ -34,8 +34,8 @@
service: name=ntpd state=stopped enabled=no service: name=ntpd state=stopped enabled=no
when: not ntp_service_enabled | bool when: not ntp_service_enabled | bool
- name: Manage the ntp firewalld rules in zone {{ firewalld_default_zone }} - name: Manage the ntp firewalld rules in the {{ firewalld_default_zone }} zone
firewalld: service=ntp zone={{ firewalld_default_zone }} permanent=True state=enabled immediate=True firewalld: service=ntp zone={{ firewalld_default_zone }} permanent=True state={{ ntp_enable_default_firewalld_rule }} immediate=True
when: firewalld_enabled | bool when: firewalld_enabled | bool
when: ansible_distribution_file_variety == "RedHat" when: ansible_distribution_file_variety == "RedHat"