- name: "Upgrade to the latest packages" apt: upgrade: "dist" autoremove: "yes" update_cache: yes - name: "Install packages" apt: name: "{{ apt_packages }}" state: "present" - name: "Allow tcp traffic on defined ports" ufw: rule: "allow" port: "22" proto: "tcp" - name: "Allow udp traffic on defined ports" ufw: rule: "allow" port: 60001:60099 proto: "udp" - name: "Enable UFW" ufw: state: "enabled" - name: "Lock root user" command: "passwd -l root" - name: "Download Pip" get_url: url: "https://bootstrap.pypa.io/get-pip.py" dest: "/tmp/get-pip.py" mode: "0644" - name: "Install pip" command: cmd: "python3 /tmp/get-pip.py"