The inventory SHALL define a servers host group containing all managed servers. Optional groups snell and trojan MAY be defined for targeted role deployment. The repository SHALL ship inventory/hosts.yml.example as a template; the actual inventory/hosts.yml SHALL be gitignored and created by the user.
hosts.yml.example to hosts.yml and fills in their valuesservers group is available with at least one hostsnell and trojan groups can be definedansible_user is set to a non-root user (e.g., ubuntu)become for privilege escalationansible_user is set to rootbecome is a no-opThe base role SHALL install essential packages: curl, wget, vim, htop, unzip, ufw, fail2ban, unattended-upgrades.
The base role SHALL configure SSH to disable password authentication, disable root login, and only allow key-based authentication. The SSH port SHALL be configurable per host via ssh_port, defaulting to 22.
/etc/ssh/sshd_config has PasswordAuthentication no, PermitRootLogin no, and PubkeyAuthentication yesssh_port: 2222 in inventoryThe base role SHALL enable UFW with a default deny incoming policy. The base role SHALL allow the SSH port (configurable via ssh_port, default 22).
The base role SHALL configure fail2ban to monitor SSH login attempts and ban IPs after repeated failures.
The base role SHALL enable unattended-upgrades for security patches.