Revert "feat(ansible): Add firewall role tasks"

This reverts commit 5db582ec1a.
This commit is contained in:
Jenkins
2026-01-06 14:45:55 +00:00
parent 5db582ec1a
commit e3db55a17c

View File

@@ -1,48 +0,0 @@
---
# Firewall role - UFW configuration
- name: Install UFW
apt:
name: ufw
state: present
tags: ['install']
- name: Set UFW default policies
ufw:
direction: "{{ item.direction }}"
policy: "{{ item.policy }}"
loop:
- { direction: 'incoming', policy: 'deny' }
- { direction: 'outgoing', policy: 'allow' }
tags: ['policy']
- name: Allow SSH
ufw:
rule: allow
port: "{{ ssh_port }}"
proto: tcp
tags: ['ssh']
- name: Allow TCP ports
ufw:
rule: allow
port: "{{ item }}"
proto: tcp
loop: "{{ firewall_allowed_tcp_ports }}"
tags: ['ports']
- name: Enable UFW
ufw:
state: enabled
tags: ['enable']
- name: Display status
command: ufw status verbose
register: ufw_status
changed_when: false
tags: ['status']
- name: Show configuration
debug:
msg: "✅ Firewall configured - {{ ufw_status.stdout_lines | length }} rules"
tags: ['status']