From 71cc3e2241473d848a5b919d8b14485d8a62510f Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Tue, 22 Nov 2022 21:22:23 +0100 Subject: [PATCH] Fix firewall ports format --- roles/ubuntu_base/tasks/firewall.yml | 43 +++++++++++++++++++++------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/roles/ubuntu_base/tasks/firewall.yml b/roles/ubuntu_base/tasks/firewall.yml index f431865..ddc9022 100644 --- a/roles/ubuntu_base/tasks/firewall.yml +++ b/roles/ubuntu_base/tasks/firewall.yml @@ -6,15 +6,36 @@ - name: Allow necessary ports community.general.ufw: rule: allow - port: "{{ item }}" + port: "{{ item.port }}" + proto: "{{ item.proto }}" loop: - - "22/tcp" # Gitea SSH - - "80/tcp" # HTTP - - "443/tcp" # HTTPS - - "389/tcp" # OpenLDAP - - "636/tcp" # OpenLDAP - - "25/tcp" # Email - - "465/tcp" # Email - - "587/tcp" # Email - - "993/tcp" # Email - - "19022/tcp" # SSH + # 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"