diff --git a/roles/ubuntu_base/tasks/firewall.yml b/roles/ubuntu_base/tasks/firewall.yml index ddc9022..17860a8 100644 --- a/roles/ubuntu_base/tasks/firewall.yml +++ b/roles/ubuntu_base/tasks/firewall.yml @@ -3,39 +3,20 @@ community.general.ufw: state: enabled policy: deny + - name: Allow necessary ports community.general.ufw: rule: allow port: "{{ item.port }}" - proto: "{{ item.proto }}" + proto: "{{ item.proto | default('tcp') }}" loop: - # Gitea SSH - - port: 22 - proto: "tcp" - # HTTP - - port: 80 - proto: "tcp" - # HTTPS - - port: 443 - proto: "tcp" - # OpenLDAP - - port: 389 - proto: "tcp" - # OpenLDAP - - port: 636 - proto: "tcp" - # Email - - port: 25 - proto: "tcp" - # Email - - port: 465 - proto: "tcp" - # Email - - port: 587 - proto: "tcp" - # Email - - port: 993 - proto: "tcp" - # SSH - - port: 19022 - proto: "tcp" + - port: 22 # Gitea SSH + - port: 80 # HTTP + - port: 443 # HTTPS + - port: 389 # OpenLDAP + - port: 636 # OpenLDAP + - port: 25 # Email + - port: 465 # Email + - port: 587 # Email + - port: 993 # Email + - port: 19022 # SSH