This Ansible playbook installs and configures most of the software that I use on my macOS devices for day-to-day work as well as web and software development. Since some things in macOS are somewhat hard to automate, this file contains a few manual installation/setup steps to ensure that at least my documentation is complete.
The installation steps are straightforward:
- Ensure that Apple's command line tools are installed
- Clone or download this repository
- On a fresh system, run the
bootstrap.sh
shell script - Ensure the Ansible environment is up to date
- Run the Ansible playbook
- Finish with manual configuration
The following is a shell script equivalent:
$ xcode-select --install
$ git clone https://github.com/rkrieger/bootstrap-macos.git
$ ./bootstrap.sh
$ ansible-galaxy install -r requirements.yml
$ ansible-playbook main.yml --ask-become-pass --extra-vars 'sshkey_passphrase=ChangeMe'
BECOME password: # Login password for an admin account
Note: If some Homebrew commands fail, you may need to agree to the Xcode licence or fix other Brew issues. Run
brew doctor
for diagnosis and a fix.
$ for item in ComputerName LocalHostName; do
sudo scutil --set ${item} ${host}
done
$ dnscacheutil -flushcache
# Ensure Terminal has Full Disk Access privileges
# (from System Preferences / Security & Privacy)
$ sudo systemsetup -setremotelogin on
$ ssh-add --apple-use-keychain ~/.ssh/id_ed25519 # Monterey and later
$ ssh-add -K ~/.ssh/id_ed25519 # earlier versions
This project is continuously tested on GitHub's Actions' macOS infrastructure.
This project was created by Rogier Krieger, inspired by Jeff Geerling's mac-dev-playbook.