This playbook should install and configures most of the software I use on my Mac for software development. It's currently a work in progress, extracting this functionality from install scripts in my dotfiles repo.
-
Install Homebrew with its official installer. This also installs Apple's Command Line Tools:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install Ansible:
/opt/homebrew/bin/brew install ansible -
Clone or download this repository to your local drive.
-
Run
/opt/homebrew/bin/ansible-galaxy install -r requirements.ymlinside this directory to install required Ansible collections. -
Run
/opt/homebrew/bin/ansible-playbook --ask-vault-pass local.ymlinside this directory. No task needssudo, so there is no 'BECOME' password prompt.
Full paths are used because the shell isn't set up for Homebrew until the dotfiles are installed.
The playbook installs everything else from the Brewfile, but never upgrades outdated packages (upgrades that need sudo can't prompt from inside Ansible). Upgrade interactively with brew bundle upgrade or brew upgrade.
Note: If Homebrew commands fail, might need to agree to Xcode's license or fix some other Brew issue. Run
brew doctorto see if this is the case.
Originally built on Jeff Geerling's https://github.com/geerlingguy/ansible-collection-mac; Homebrew is now installed during bootstrap and the playbook only applies the Brewfile.
An incomplete, inexact and inaccurate list of other steps needed post-install that I haven't, can't or won't automate
Install YouTube Music (Pear Desktop, formerly th-ch/youtube-music): download the YouTube-Music-*-arm64.dmg from https://github.com/pear-devs/pear-desktop/releases/latest.