feat: prepare-new-server playbook + role struktura

playbook prepare-new-server.yml:
- update systemu
- deploy user (UID 1000, heslo zamknuto)
- SSH klic pro deploy uzivatele
- adresarova struktura (/home/deploy/{docker,scripts,backups,logs,...})
- Docker Engine + Compose plugin (bez sudo)
- UFW firewall (22, 80, 443)
- fail2ban
- overeni docker bez sudo

Role (kazda v samostatnem adresari):
- common: update, base packages, timezone
- deploy-user: vytvoreni usera UID 1000
- ssh-keys: authorized_keys deployment
- firewall: UFW konfigurace
- docker: Docker Engine + Compose + daemon.json
- directories: /home/deploy/{docker/<sluzba>,backups,scripts,logs}

Pouziti:
  ansible-playbook -i inventory.yml playbooks/prepare-new-server.yml
This commit is contained in:
2026-08-01 20:02:19 +02:00
parent da9003aef8
commit ec2f1d639c
16 changed files with 638 additions and 15 deletions
+8
View File
@@ -0,0 +1,8 @@
---
# Proměnné pro firewall roli
ssh_port: 22
# Dalsi porty co chces povolit (pro servery)
allowed_ports:
- { port: 80, proto: tcp, comment: "HTTP" }
- { port: 443, proto: tcp, comment: "HTTPS" }
- { port: "{{ ssh_port }}", proto: tcp, comment: "SSH" }