ansible-base/roles/proftpd/tasks/main.json
2024-06-01 17:17:40 +02:00

39 lines
687 B
JSON

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