Simple Ansible playbooks to set up development environments on Linux and macOS machines.
.
├── linux-setup/ # Local Linux machine setup
│ ├── inventory.yml # Local machine inventory
│ └── playbook.yml # Setup playbook
├── linux-remote-setup/ # Remote Linux machine setup
│ ├── inventory.yml # Remote machines inventory
│ └── playbook.yml # Setup playbook
└── macos-setup/ # Local macOS setup
├── inventory.yml # Local machine inventory
└── playbook.yml # Setup playbook
Sets up a development environment with common tools and configurations. Choose the setup based on your needs:
- For setting up your local Linux development machine
- Supports Ubuntu 22.04, Debian 12, and Fedora 38
- Installs and configures common development tools
- For setting up remote Linux development servers
- Same distribution support as local setup
- Includes additional security configurations
- Configurable via
group_vars/all.yaml
- For setting up your local macOS development machine
- Uses Homebrew for package management
- Includes macOS-specific optimizations
# On Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y python3 python3-pip
pip3 install ansible
# On Fedora
sudo dnf install -y python3 python3-pip
pip3 install ansible
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Ansible
brew install ansible
You can check the getting started guide here.
# Clone this repository
git clone <repository-url>
cd setup-machine
# Run the local setup
cd linux-setup
ansible-playbook -i inventory.yml playbook.yml
- Edit the inventory file:
cd linux-remote-setup
cp inventory.yml my-servers.yml # Create your own inventory file
# Edit my-servers.yml with your server details:
# Example:
# all:
# hosts:
# dev-server:
# ansible_host: 192.168.1.100
# ansible_user: your-username
- Run the setup:
ansible-playbook -i my-servers.yml playbook.yml
cd macos-setup
ansible-playbook -i inventory.yml playbook.yml
- Git
- Zsh with Oh My Zsh
- Powerlevel10k theme
- Python 3 with virtualenv
- Node.js and npm
- Docker
- Common utilities (curl, wget, htop, tmux, vim)
- Homebrew
- iTerm2
- Visual Studio Code
- Docker Desktop
- macOS-specific settings (key repeat, Finder preferences)
- UFW/firewalld configuration
- SSH security hardening
- No root login
- Key-based authentication
Edit linux-remote-setup/group_vars/all.yaml
to customize:
- Package lists
- Security settings
- Docker configuration
- Shell preferences
Example customization:
# Disable Docker installation
docker_settings:
install: false
# Change security settings
security_settings:
ufw_enabled: true
ssh_settings:
permit_root_login: false
password_authentication: false
Edit macos-setup/playbook.yml
to:
- Modify package lists
- Change macOS settings
- Add/remove applications
-
Homebrew Update Fails (macOS)
- This is usually due to network connectivity
- The playbook will retry automatically
- You can safely ignore update failures
-
SSH Connection Issues (Remote Setup)
- Ensure your SSH key is added to the remote server
- Verify the server is reachable
- Check the username and host in inventory file
-
Permission Issues
- For local setup: Run with sudo if required
- For remote setup: Ensure your user has sudo privileges
MIT License - see LICENSE file