--- - name: Nainstaluj UFW ansible.builtin.apt: name: ufw state: present update_cache: true - name: Reset UFW na default community.general.ufw: state: reset - name: UFW default - deny incoming community.general.ufw: direction: incoming policy: deny - name: UFW default - allow outgoing community.general.ufw: direction: outgoing policy: allow - name: Povol porty pres UFW community.general.ufw: rule: allow port: "{{ item.port }}" proto: "{{ item.proto }}" comment: "{{ item.comment }}" loop: "{{ allowed_ports }}" - name: Aktivuj UFW community.general.ufw: state: enabled