Mac Setup Playbook

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.

Installation

  1. Ensure Apple's command line tools are installed (xcode-select --install to launch the installer).

  2. Install Ansible:

    1. Run the following command to add Python 3 to your $PATH: export PATH="$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:$PATH"
    2. Upgrade Pip: sudo pip3 install --upgrade pip
    3. Install Ansible: pip3 install ansible
  3. Clone or download this repository to your local drive.

  4. Run ansible-galaxy install -r requirements.yml inside this directory to install required Ansible roles.

  5. 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.