This playbook installs and configures most of the software I use on my Mac for web and software development. There are still a few manual steps, documented here.
- Download and extract the Apple Command Line Tools from here.
- Extract and run the pkg installer then run the following commands to install the package and then the headers
sudo installer -pkg \
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Recommended for now due to common build problems with pyenv.
export PYTHON_CONFIGURE_OPTS="--enable-framework"
brew install readline xz python
pip3 install --user --upgrade pynvim
Not recommended for now due to common build problems in OS X 10.14 Mojave and other platforms.
- Install pyenv and pipenv with brew
- Add pyenv init to .bash_profile
- Run
export PYTHON_CONFIGURE_OPTS="--enable-framework"
to ensure python compiles correctly for use with cmake - Install dependencies with
brew install readline xz
- Install python 2 and 3 via pyenv
- Set python version to 3.7.3
- Upgrade pynvim (for use with YouCompleteMe vim plugin)
brew install pyenv pipenv
pyenv init
# Add eval "$(pyenv init -)" to .bash_profile
export PYTHON_CONFIGURE_OPTS="--enable-framework"
brew install readline xz
pyenv install 2.7.16
pyenv install 3.7.3
pyenv global 3.7.3
pyenv rehash
pip3 install --user --upgrade pynvim
- Install ansible via brew
- Clone this repository
- Install required roles
- Run the playbook in check mode
- Run the playbook
- Running individual tasks by tag
# Install ansible
brew install ansible
# Clone this repository
git clone https://github.com/bginbey/mac-dev-playbook.git
# Install roles (from repo directory)
ansible-galaxy install -r requirements.yml
# Run playbook in check mode
# Sequentially dependent tasks may appear to fail
ansible-playbook main.yml -i inventory --check -K -vvvv
# Run playbook
ansible-playbook main.yml -i inventory -K -vvvv
# Run tasks by tag
ansible-playbook main.yml -i inventory -K --tags "dotfiles,homebrew"
Any variable can be overridden in config.yml
. For example, you can customize the installed packages and apps with something like:
homebrew_installed_packages:
- cowsay
- git
- go
- Docker
- .NET SDK
- Firefox
- Google Chrome
- Google Drive File Stream
- Hyper
- KeypassX
- Private Internet Access
- ShiftIt
- Visual Studio Code
- Visual Studio
- git
- hub
- cmake
- node
- neovim
Dotfiles are installed into ~/dotfiles/ with symbolic links in the home directory. The .neovim-init is also linked to Neovim's default location ./config/nvim/init.vim You can disable dotfiles management by setting configure_dotfiles: no
in your configuration.
- .zshrc
- .gitconfig
- .hyper.js
- .osx
- .antigen
- .neovim-init.vim
- git
- heroku
- pip
- lein
- command-not-found
- Visual Studio dotfile configuration
- Visual Studio Code dotfile configuration
- Adobe Creative Cloud
See instructions for how to build a Mac OS X VirtualBox VM, on which playbooks may be run for testing.