/osx-automation

Setup macOS with Ansible

Primary LanguageMakefile

osx-automation

Ansible script installs and configures most of software that I use on my MBP on a daily basis. It manages macOS settings via osx_defaults. Some settings are slightly difficult to automate, so I still have manual installation steps.

Sources:

Defaults tweaks:

Note: macOS caches some settings! You may need to logout and login to apply the changes.

Installation

  1. Ensure Apple's command line tools are installed
  2. Install Brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Install Ansible: brew install ansible
  4. make install

You can filter which part of the provisioning process to run by specifying a set of tags using ansible-playbook's --tags flag. The tags available are homebrew, settings and dotfiles.

Configuration

You can customize installed packages and apps by editing config.yml:

install_apps: yes
install_dev_tools: yes
install_java: yes
install_scala: yes
install_haskell: yes
...

Dotfiles

Fonts

Fish

You will need to add $(brew --prefix)/bin/fish to /etc/shells. Then run: chsh -s $(brew --prefix)/bin/fish to make fish your default shell.

Install oh-my-fish:

curl -L https://get.oh-my.fish > install
fish install --path=~/.local/share/omf --config=~/.config/omf

Git aliases:

omf install https://github.com/jhillyerd/plugin-git

Links: