Ansible configurations, playbooks and roles for setting up an OSX host.
osx-ansible/playbooks/common.yml shows what roles will be loaded.
To see what any role does, look at osx-ansible/roles/${role}/task/main.yml
cd osx-ansible
cp example.yml local.yml
Or you can just create your own local.yml file with just the variables you'd like to override over varaibles from defaults.yml.
You'll want to do this, as some defaults variables have my info in them.
sudo /bin/zsh # not sure why, but we need to sudo once before the install-homebrew script works
exit
./roles/homebrew/files/install-homebrew.sh # homebrew will not install if its run as root
eval "$(/opt/homebrew/bin/brew shellenv)" # by default after installing homebrew it will not be part of your path
make bootstrap
make install
./bootstrap.sh
ansible-playbook playbooks/common.yml -K
- base: installs osx_base role
- install: runs the bootstrap script
- dump_facts: dumps all local facts ansible can find
- osx_base: sets up some things (hostname, login shell, create directories, create ssh key, set searchdomains)
- dotfiles: installs dotfiles from a repo you provide
- homebrew: install packages from homebrew/homebrew cask
- mas: connects to the Mac App Store and installs applications from there
- github: uploads ssh key to github, clones all my repos from github
- defaults: MacOS defaults write commands
- vim-plug: sets up vim-plug
- wallpaper: sets your wallpaper to a file of your choosing
- update: runs update playbook; updates mas, homebrew, hombrew cask, npm, pip packages and ruby gems
- complete: runs all of these (minus install) only asking for one sudo password
- all: runs all of these, but will ask for sudo password for each role that requires it