2024-11-12 20:14:17 +00:00
|
|
|
- name: Install firewalld
|
|
|
|
zypper:
|
|
|
|
name: firewalld
|
|
|
|
state: present
|
2024-11-24 16:44:14 +00:00
|
|
|
notify:
|
|
|
|
- Restart firewalld
|
2024-11-12 20:14:17 +00:00
|
|
|
|
|
|
|
- name: Ensure firewalld is enabled and started
|
|
|
|
systemd:
|
|
|
|
name: firewalld
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
2024-11-24 16:44:14 +00:00
|
|
|
notify:
|
|
|
|
- Restart firewalld
|
2024-11-12 20:14:17 +00:00
|
|
|
|
|
|
|
- name: Open specified firewall ports
|
|
|
|
firewalld:
|
|
|
|
port: "{{ item.port }}/{{ item.protocol }}"
|
|
|
|
permanent: yes
|
|
|
|
state: enabled
|
|
|
|
immediate: yes
|
2024-11-24 16:44:14 +00:00
|
|
|
loop: "{{ firewall_ports }}"
|
|
|
|
notify:
|
|
|
|
- Restart firewalld
|