Modern Ansible playbooks for configuring development machines and servers with improved reliability, Python management via uv, and SSH key management.
Before starting, ensure you have access to your SSH keys. You have two options:
If you have your SSH keys already set up, the bootstrap script will detect and use them automatically.
If you need to download a key from a server, set the SSH_KEY_URL environment variable:
export SSH_KEY_URL="https://your-server.com/ssh-key"The dotfiles-bootstrap.sh script will handle cloning your dotfiles and running the installation:
# Make the script executable
chmod +x dotfiles-bootstrap.sh
# Run the bootstrap script (customize the REPO if needed)
REPO="git@github.com:yourusername/dotfiles.git" ./dotfiles-bootstrap.shThe script will:
- Check for existing SSH keys
- Attempt to clone your dotfiles repository
- If needed, download a temporary SSH key from the specified URL
- Run the dotfiles installation script
# Run the Ansible bootstrap to set up the environment
./bootstrap.sh
# Configure everything
just alljust all- Configure everything (development machine with Python/uv, SSH keys, etc.)just server- Configure as server (base + docker + git + shell + cockpit + Python + SSH)just dev- Install development tools with modern Python management
just python- Setup Python with uv package managerjust ssh- Setup SSH key managementjust shell- Setup shell configuration (Zsh + Oh My Zsh)just git- Setup git configurationjust base- Install base system packages (includes Homebrew and Neovim)just brew- Setup Homebrewjust neovim- Install Neovim editor
just check- Check syntax onlyjust ubuntu- Test with Ubuntujust fedora- Test with Fedorajust arch- Test with Arch Linux
- Multi-distro support: Ubuntu/Debian, Fedora/RHEL, Arch Linux
- Essential packages and utilities
- Improved error handling and distribution detection
- Modern Python management using uv instead of pyenv
- Faster, lighter, and more reliable than traditional Python version managers
- Automatic Python version installation and management
- Global package management with uv
- Automated SSH key generation (Ed25519)
- SSH config management with GitHub/GitLab defaults
- SKM integration for multiple key management
- FastAPI-based key sharing service (see
ssh-key-manager/)
- Node.js and npm
- Rust and Cargo
- Zellij terminal multiplexer
- Tree-sitter
- Kubernetes tools:
- kubectl
- Helm
- k9s
- kubecm
- Infrastructure tools:
- Terraform
- Installs Docker using geerlingguy.docker role
- Adds user to docker group
- Installs lazydocker
just dev # Setup development environment (base + brew + neovim + git + shell + dev tools)
just server # Basic server setup (base + brew + neovim + git + shell + docker)
just all # Install everythingjust base # Install base system packages (includes brew and neovim)
just git # Setup git configuration
just shell # Setup shell configuration (includes brew and neovim)
just brew # Install Homebrew
just neovim # Install Neovim editor from GitHub releasesTest the playbooks in Docker containers:
just ubuntu # Test on Ubuntu
just fedora # Test on Fedora
just arch # Test on Arch LinuxThe roles are executed in the following order by site.yml to ensure proper dependencies:
homebrew: Package manager (optional, used for additional tools and formulae)neovim: Text editor installation (from GitHub releases)base-system: Core system packages- Other roles (git, ssh-keys, tailscale, python-uv, shell, dotfiles, development, docker, cockpit)
-
workstations: Development machineslocalhost: Local development machinebabyblue: Additional workstation
-
servers: Remote servers (via Tailscale)ghost: Main serverghost-vault: Vault server
-
development: Group containing all workstations -
homelab: Group containing all servers
Key variables that control role execution:
install_development_tools– enable development tools (developmentrole)install_docker– enable Docker roles (geerlingguy.dockeranddockerroles)setup_shell– enable shell configuration (shell-setuprole)setup_ssh_keys– enable SSH key management (ssh-keysrole)setup_tailscale– enable Tailscale (tailscalerole)install_python_uv– enable Python via uv (python-uvrole)setup_dotfiles– enable dotfiles setup (dotfilesrole)install_cockpit– enable Cockpit (cockpitrole)
- Ansible 2.9+
- Python 3.x
justcommand runner (installed via bootstrap)
- The playbooks are designed to be idempotent and can be run multiple times
- Docker installation requires root privileges
- Some roles (like development) are opt-in and need to be explicitly enabled
- The bootstrap script installs all necessary dependencies
- Neovim is installed from the official GitHub releases tarball into
/usr/localto ensure consistency across systems and containers