--- - name: Install UFW ansible.builtin.apt: name: ufw - name: Allow 22/tcp (SSH) community.general.ufw: rule: allow port: "22" proto: tcp - name: Enable UFW community.general.ufw: state: enabled