Simple ansible playbook to quickly setup basic debian server from bare-bones vm image.
- Creates user with sudo privileges
- Sets up ssh-key only authentication
- Changes hostname and hosts file
- Sets en.US.UTF-8 locale
- Installs configured packages
- Simple firewall configuration
- Creates and mounts swap file
Debian 11 netinstall vm with:
- ssh server running on default config
- only root user
- python3 installed
- no swap file or partition
- Clone this repository
- Configure vars.yml to your liking
- Add target hostname to inventory
- Run following commands on target host to install python and clean hosts and authorized_keys files
apt update & apt upgrade -y & apt install -y python3
: | tee /etc/hosts /root/.ssh/authorized_keys
- Run basic-setup.sh
- Enter passwords and ssh-key path in prompt