feat: initial commit

This commit is contained in:
lucasdpt
2026-06-04 09:45:51 +02:00
commit 4f9511f313
15 changed files with 600 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
---
- name: Configurer UFW sur Ubuntu
hosts: ubuntu
become: yes
tasks:
- name: Installer UFW
ansible.builtin.apt:
name: ufw
state: present
- name: Autoriser SSH
community.general.ufw:
rule: allow
port: '22'
proto: tcp
- name: Autoriser MySQL seulement depuis le réseau privé des VMs
community.general.ufw:
rule: allow
from_ip: "{{ mysql_network_cidr }}"
to_port: "{{ mysql_port }}"
proto: tcp
- name: Activer UFW avec refus entrant par défaut
community.general.ufw:
state: enabled
policy: deny
direction: incoming