coursework/ansible/roles/firewall/tasks/main.yml

18 lines
395 B
YAML
Raw Normal View History

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