This repository contains Ansible playbooks and scripts to automatically set up a new Mac for development. It installs and configures various tools and applications, saving time and effort when setting up a new machine.
- A Mac running macOS (tested on macOS 15.0 arm64)
- Internet connection
-
Clone this repository:
git clone https://github.com/your-username/mac-dev-setup.git cd mac-dev-setup
-
Choose the appropriate installation script:
- For personal setup:
./install-personal.sh
- For work setup:
./install-work.sh
These scripts will:
- Run
setup.sh
to install or update Homebrew, Python, and Ansible - Execute the appropriate Ansible playbook with the necessary tags
- For personal setup:
-
To install private keys (optional):
./install-keys.sh
This script uses Ansible Vault to decrypt and install private keys.
- The
defaults.yaml
file contains default settings and package lists. - The
local.yaml
file is the main Ansible playbook that imports various tasks. - The
vars/api_keys.yml
file contains encrypted API keys. For more information, see API Keys Documentation.
-
Set up the iTerm2 theme:
- Open iTerm2 -> Preferences -> Profiles
- Select "Mac Dev Environment" profile
- Click "Other Actions" and select "Set as Default"
-
Set up GPG for Git: After running the installation script, manually run:
gpgconf --kill gpg-agent
Then make a Git commit. This will store the GPG key in the keychain.
-
If you encounter issues with Python or pip, try the following steps:
-
Ensure you have the latest version of Homebrew:
brew update && brew upgrade
-
Reinstall Python using Homebrew:
brew reinstall python
-
Restart your terminal or source your
.zshrc
:source ~/.zshrc
-
-
If Homebrew is installed but not recognized, restart your terminal and run the script again.
-
If certain tools are not recognized after installation, try sourcing your
.zshrc
file:source ~/.zshrc
-
In some cases, you may need to run the installation script multiple times to ensure all components are properly installed and configured.
-
If you encounter permission issues, ensure you have the necessary rights to install software on your system.
This is a personal project for my own setup, but if you find any issues or have suggestions, please feel free to open an issue or submit a pull request.
[Include your license information here]