Merge pull request 'firewall rules only when firewalld is enabled.' (!14) from adellam/ansible-role-zabbix-agent:master into master

Reviewed-on: #14
This commit is contained in:
Andrea Dell'Amico 2021-12-03 13:42:18 +01:00
commit 82949c87e7
1 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,13 @@
- name: Manage the zabbix agent firewalld rules
block:
- name: Manage the zabbix agent firewall services
firewalld: service={{ item.service }} zone={{ item.zone }} permanent={{ item.permanent | default(True) }} state={{ item.state }} immediate=True
firewalld:
service: '{{ item.service }}'
zone: '{{ item.zone }}'
permanent: '{{ item.permanent | default(True) }}'
state: '{{ item.state }}'
immediate: True
with_items: '{{ zabbix_agent_firewalld_services }}'
when: firewalld_enabled
tags: [ zabbix', 'zabbix_agent', 'firewall', 'firewalld', 'iptables', 'iptables_rules' ]