A powerful, automated configuration management system for MacBook Pro setup using Ansible.
- 🔧 Automated Setup: One-command configuration for your entire MacBook
- 🛠️ Modular Design: Organized into specialized roles for easy maintenance
- 🔄 Idempotent: Safe to run multiple times without side effects
- 🧪 Validation: Pre-commit hooks ensure code quality
- 📦 Package Management: Automated installation of Homebrew formulae, casks, and Python packages
- 🔐 Security: Secure SSH key and configuration management
- 🎨 Development Tools: Pre-configured Neovim and tmux setup
- 🧹 Clean Uninstall: Easy removal of all managed configurations
# Install configuration
make apply
# Preview changes (dry run)
make check
# Remove configuration
make delete
# Clean build environment
make cleanThe configuration is organized into specialized roles:
| Role | Description |
|---|---|
common |
Creates required directories |
ssh |
Manages SSH keys and configuration |
dotfiles |
Manages shell config files (.zshrc, .aliases) |
neovim |
Configures Neovim editor |
tmux |
Sets up tmux configuration |
packages |
Manages Homebrew formulae, casks, and Python packages |
cleanup |
Removes managed files (uninstallation) |
make ssh # SSH keys and config only
make dotfiles # Shell config files only
make neovim # Neovim config only
make tmux # tmux config only
make packages # Install packages onlyThe repository uses pre-commit hooks to maintain high code quality:
# Set up git hooks (run once after cloning)
make setup-git-hooks
# Run pre-commit checks manually
make pre-commit
# Run linting only
make lintPre-commit checks include:
- ✅ YAML syntax validation
- ✅ Ansible playbook linting
- ✅ Trailing whitespace and EOF fixing
- ✅ Merge conflict detection
inventory: Contains host groups (local, work, personal)group_vars/macbooks.yml: Common variables for all MacBookshost_vars/: Host-specific variables (create files like hostname.yml)
- Add the host to the inventory file
- Create host-specific files in
host_files/hostname/ - Optionally add host-specific variables in
host_vars/hostname.yml - Run:
ANSIBLE_LIMIT=hostname make apply
- Choose the appropriate role or create a new one
- Add tasks to the role's
tasks/main.ymlfile - Add templates to the role's
templates/directory - Add static files to the role's
files/directory - Update the README.md to document the changes
- Python 3.x
- Ansible
- macOS (for target machines)
This project is privately maintained.
Made with ❤️ for MacBook Pro users