[ { "name": "install packages", "become": true, "ansible.builtin.apt": { "update_cache": true, "pkg": [ "proftpd-core" ] } }, { "name": "Check wether enabling UFW would be considered a changed", "check_mode": true, "community.general.ufw": { "state": "enabled", "register": "ufw_enable_check" } }, { "name": "Allow FTP port 20 in ufw", "community.general.ufw": { "rule": "allow", "port": "20", "proto": "tcp" }, "when": "not ufw_enable_check.changed" }, { "name": "Allow FTP port 21 in ufw", "community.general.ufw": { "rule": "allow", "port": "21", "proto": "tcp" }, "when": "not ufw_enable_check.changed" } ]