This directory contains Ansible automation scripts to set up a consistent development environment on Ubuntu. The automation installs and configures common development tools, applications, and settings to create a ready-to-use development environment.
- 📦 APT Package Management: Installs essential development tools and applications
- 📱 Snap Package Management: Installs GUI applications via Snap
- 🐳 Docker Setup: Installs Docker and adds the user to the Docker group
- 🔧 PowerShell Setup: Installs PowerShell and modules for development
- 🐍 Python Setup: Installs Python versions via pyenv, bootstraps uv via pipx, and installs CLI tools via uv
- 💎 Ruby Setup: Installs Ruby via rbenv
- 🟦 Node.js Setup: Installs Node.js and npm global packages
- 🦀 Rust Setup: Installs Rust via rustup
- ⚡ Go Setup: Installs Go
- 🔷 .NET Setup: Installs .NET SDK and global tools
- 💻 VS Code Extensions: Configures VS Code with essential development extensions
- 🔄 Git Setup: Configures Git with user information, Git LFS, and Git Credential Manager
- 🏗️ FEX Emulator: Installs FEX for running x86/x64 applications on ARM64 systems
- 📦 AppImage Support: Installs applications via AppImage with desktop integration
- 🚀 Custom Script Support: Allows for additional customization via custom scripts
- Ubuntu 24.04 (also works on older versions)
- Internet connection
- Administrator (sudo) privileges
This setup has been tested and confirmed to work on:
- Ubuntu 24.04 LTS
- Ubuntu 22.04 LTS
- WSL Ubuntu
-
Get the script:
# Clone the repository if you haven't already git clone https://github.com/ryanspletzer/dev-machine-setup.git cd dev-machine-setup/ubuntu # Allow the setup.sh script to run chmod +x ./setup.sh
-
Run the setup script:
# Run the script ./setup.sh -e "your.email@example.com"
The setup.sh script accepts several options:
Usage: ./setup.sh [-v] [-e git_email] [-n git_name] [-p] [-c] [playbook_file]
-v Enable verbose output (can be repeated for more verbosity, e.g. -vv or -vvv)
-e git_email Specify Git user email
-n git_name Specify Git user name
-p Install prerequisites only (Ansible), don't run Ansible playbook
-c CI mode: skip interactive sudo prompts (assumes passwordless sudo)
playbook_file Optional playbook file name (defaults to setup.yaml)-
Basic installation with Git email:
./setup.sh -e "your.email@example.com" -
Install with verbose output and custom Git name:
./setup.sh -v -e "your.email@example.com" -n "Your Name"
-
Install prerequisites only (Ansible):
./setup.sh -p
-
Use a custom playbook file:
./setup.sh custom_setup.yaml
Edit vars.yaml to customize which packages get installed:
# Command-line tools and libraries via APT (object format)
apt_packages:
- name: git
- name: curl
- name: build-essential
- name: docker-ce
# GUI applications via Snap (object format)
snap_packages:
- name: drawio
classic: true
supported_architectures:
- amd64
- name: slack
classic: true
supported_architectures:
- amd64# PowerShell modules
powershell_modules:
- AWS.Tools.Common
- Terminal-Icons
# Bootstrap uv via pipx
pipx_packages:
- uv
# Python CLI tools via uv
uv_tools:
- poetry
- black
# VS Code extensions
vscode_extensions:
- ms-vscode.powershell
- github.copilotIf you're running in WSL, set is_wsl: true in vars.yaml to enable WSL-specific configurations.
You can add custom commands to be executed during setup by adding entries to
custom_commands_user and custom_commands_elevated in vars.yaml.
To add additional setup steps:
- Create a custom script in the
examples/directory or elsewhere - Set the
custom_scriptvariable invars.yamlto point to your script - Make sure the script is executable (
chmod +x your_script.sh)
setup.sh: Main setup script that installs prerequisites and runs the Ansible playbooksetup.yaml: Ansible playbook that performs the installation and configurationvars.yaml: Configuration variables defining what gets installedexamples/: Directory containing example custom scripts
For comprehensive documentation and examples:
- Complete Documentation - Full project documentation
- Design Principles - Understanding the philosophy
- Troubleshooting Guide - Common issues and solutions
- Architecture Overview - How all the pieces fit together
- Package Management Strategy - Our approach to managing packages
The default setup includes a curated selection of popular development tools and applications:
- Docker
- Git and Git LFS
- Visual Studio Code
- .NET SDK
- Python, Node.js, Ruby, Go, Rust
- AWS CLI, Azure CLI
- PowerShell
- Wine64 (Windows compatibility layer)
- Visual Studio Code
- Slack
- Docker Desktop
See vars.yaml for the complete list of installed packages.
The playbook uses tags to allow selective execution of tasks:
system: System-level tasksarchitecture: Architecture detectionwsl: WSL-specific configuration
apt: All APT-related tasksupdate: Only update APT cacheupgrade: Only upgrade packagespackages: Only install packagesprereqs: Only prerequisite packagesrepositories: Only add repositories
snap: Snap package installationappimage: AppImage package installationpowershell: PowerShell installation and module setuppipx: Python package installation via pipx (bootstraps uv)uv: Python CLI tool installation via uvnpm: Node.js package installation via npmdotnet: .NET SDK and tools installationvscode: VS Code extension installationcursor: Cursor extension installationgit: Git configuration taskscustom: Custom commands and script executionuser-commands: User-level commandselevated-commands: Commands requiring sudo
You can run the playbook with specific tags using the -t option:
ansible-playbook -t apt,git setup.yaml- Logs: All installation logs are saved to a timestamped log file in the current directory.
- Verbosity: Use the
-vflag (can be repeated for more detail) to see more information during setup. - Failed Tasks: You can safely rerun the setup script - it will skip already completed tasks.
- Dependencies: If you encounter errors about missing dependencies,
try running with the
-pflag first to install prerequisites, then run the script again normally.
- The setup script securely handles your sudo password.
- All sudo operations are performed via Ansible which is safer than multiple direct sudo calls.
- The script only runs commands defined in the Ansible playbook or in your custom commands / custom script.
If you're using WSL (Windows Subsystem for Linux), make sure to:
- Set
is_wsl: trueinvars.yaml - Consider whether you need all the GUI applications since WSL is primarily a terminal environment
- Some features like Docker might be better installed on the Windows host when using WSL 2