main.yml (547B)
1 --- 2 - name: Install packages needed for ufw 3 community.general.pacman: 4 name: 5 - ufw 6 - ufw-extras 7 state: present 8 9 - name: Configure the firewall incoming connection policy 10 community.general.ufw: 11 direction: incoming 12 policy: deny 13 14 - name: Configure the firewall outgoing connection policy 15 community.general.ufw: 16 direction: outgoing 17 policy: allow 18 19 - name: Allow incoming ports 20 community.general.ufw: 21 rule: allow 22 port: "22" 23 proto: tcp 24 - name: Enable UFW 25 community.general.ufw: 26 state: enabled