This is the playbook I use after a clean install of MacOS to set everything up.
- Installs Homebrew packages and app casks (Role
homebrew
) - Installs App Store apps with
mas-cli
(Rolemas
) - Modifies MacOS settings (Role
settings
) - Changes the user shell, if configured (Role
shell
)
- Install Homebrew.
- Install Python (
brew install python
) - Install Ansible (
pip3 install ansible
) - Copy
default.config.yml
toconfig.yml
and edit the configuration to your likings.- Don't skip this, otherwise your computer will be provisioned like mine :)
- Run
ansible-playbook main.yml
. Enter your account password when prompted.- If you have a configuration stored elsewhere (e.g. in a dotfiles folders), run
ansible-playbook main.yml --extra-vars=@/path/to/my/config.yml
- If you have a configuration stored elsewhere (e.g. in a dotfiles folders), run
If you forked this repository and want to include its latest changes without losing your own, add this repository as an upstream and rebase it onto your fork:
git remote add upstream [email protected]:jeromegamez/ansible-macos-playbook.git
git fetch upstream
git rebase upstream/master
This playbook is heavily inspired by Jeff Geerling's mac-dev-playbook.
The macOS settings (a.k.a. defaults write
s) are mostly taken from
Mathias Bynens' defaults scripts or from one of the
dotfiles repos from http://dotfiles.github.io.