A collection of Ansible playbooks for setting up development machines and servers. These playbooks automate the installation and configuration of various development tools, system utilities, and server components.
-
Clone this repository:
git clone https://github.com/yourusername/ansible-playbooks.git cd ansible-playbooks
-
Run the bootstrap script:
./bootstrap.sh
-
Choose your setup:
just dev # For a full development environment just server # For a basic server setup just all # For everything
- Essential system packages and utilities
- Development tools (git, tmux, etc.)
- System monitoring tools (htop, btm)
- Terminal utilities (fzf, bandwhich, tealdeer)
- Installs Homebrew package manager
- Configures Homebrew paths
- Manages Homebrew formulae
- Required for Neovim installation
- Installs Neovim via Homebrew
- Ensures consistent installation across different systems
- Requires Homebrew role
- Configures global git settings
- Sets up SSH keys
- Installs lazygit
- Configures git credential helper
- Configures ZSH with modern tools
- Sets up Starship prompt
- Configures direnv
- Adds useful shell aliases and functions
- Installs JetBrains Mono Nerd Font
- 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 everything
just 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 via Homebrew
Test the playbooks in Docker containers:
just ubuntu # Test on Ubuntu
just fedora # Test on Fedora
just arch # Test on Arch Linux
The roles are executed in the following order to ensure proper dependencies:
base-system
: Core system packageshomebrew
: Package manager (required for Neovim)neovim
: Text editor installation- Other roles (git, shell, development, docker)
-
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 installationinstall_docker
: Enable Docker installationsetup_shell
: Enable shell configurationsetup_monitoring
: Enable system monitoring tools
- Ansible 2.9+
- Python 3.x
just
command 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 via Homebrew to ensure consistency across systems and containers