Ansible playbook to setup my Mac with some programs and configure zsh etc.
This is inspired by the following three playbooks: https://github.com/geerlingguy/mac-dev-playbook, https://github.com/cpettifer/mac-desktop and https://github.com/denialanderror/automac.
-
Ensure Apple's command line tools are installed (
xcode-select --install
to launch the installer). -
- Run the following command to add Python 3 to your $PATH:
export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH"
- Upgrade Pip:
sudo pip3 install --upgrade pip
- Install Ansible:
pip3 install ansible
- Run the following command to add Python 3 to your $PATH:
-
Clone or download this repository to your local drive.
-
Run
ansible-galaxy install -r requirements.yml
inside this directory to install required Ansible roles. -
Run
ansible-playbook main.yml --ask-become-pass
inside this directory. Enter your macOS account password when prompted for the 'BECOME' password. The following shell command can also be run (easier to remember)sh ansible-playbook.sh
.
Note: If some Homebrew commands fail, you might need to agree to Xcode's license or fix some other Brew issue. Run
brew doctor
to see if this is the case.