ansible-base/roles/ufw/tasks/main.json

46 lines
699 B
JSON
Raw Permalink Normal View History

[
{
"name": "install ufw",
"become": true,
"ansible.builtin.apt": {
"update_cache": true,
"pkg": [
"ufw"
]
}
},
{
"name": "ufw deny incoming",
"become": true,
"community.general.ufw": {
"direction": "incoming",
"proto": "any",
"policy": "deny"
}
},
{
"name": "ufw allow outgoing",
"become": true,
"community.general.ufw": {
"direction": "outgoing",
"proto": "any",
"policy": "allow"
}
},
{
"name": "ufw allow and rate-limit ssh",
"become": true,
"community.general.ufw": {
"rule": "limit",
"name": "ssh"
}
},
{
"name": "enable ufw service",
"become": true,
"community.general.ufw": {
"state": "enabled"
}
}
]