Skip to content

Install all your applications and configure everything the way you like it with one command

Notifications You must be signed in to change notification settings

king-tobi/macbook-playbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macbook-playbook

Ansible playbook to prepare and maintain macOS for development and desktop use.

Table of Contents

Tested on

I’ve been using macbook-playbook for 6 years now. I’ve used it on at least four MacBookPros with different macOS versions. The macOS version on my current MacBookPros is 10.14.4 as of [2020-01-03 Fri].

Please let me know if you try macbook-playbook out and bump into something.

Configuring machine

Install Developer Tools (xcode-select)

Open the Terminal application and type `git` into the shell.

Clone repository

git clone https://github.com/mpereira/macbook-playbook.git

Create an Ansible Vault password

This password will be used to encrypt and decrypt the files referenced in the Encrypted files section. Please make sure to use a strong password.

echo 'SomePassword123$' > .ansible_vault_password

Encrypted files (using Ansible Vault)

The files currently checked into this git repository are encrypted with my personal Ansible Vault password. Unless you have my password, roles referencing these files will fail to run.

DescriptionFileRole
AWS CLI credentialsawscli/files/credentialsawscli
BetterTouchTool licensebetter-touch-tool/files/license.xmlbetter-touch-tool
Enviroment variables for dotfilesdotfiles/vars/environment.ymldotfiles
Prey API keyprey/vars/api_key.ymlprey
Private SSH keyssh-keys/files/id_rsassh-keys
s3cmd configurations3cmd/files/.s3cfgs3cmd

You have two choices: skip these roles, and/or overwrite the encrypted files with your own.

To overwrite them first run

make truncate-sensitive-files

And then you’ll be able to overwrite them with your own files (for example your own ~/.ssh/id_rsa) and then encrypt them with make encrypt.

Prepare machine to run the Ansible playbooks

This installs the macOS Command Line Developer tools and Ansible.

make bootstrap

Provision machine

This runs all roles under roles.

make converge

ansible-playbook arguments can be passed via the ARGS environment variable. For example, --tags can be passed so that only matching roles are run.

make converge ARGS='--tags google-chrome'

--skip-tags can also be passed to avoid running certain roles.

make converge ARGS='--skip-tags unity'

All role tags can be seen in =main.yml=.

Manual steps post make converge

These are steps that are currently not automated either because: a) it would be difficult b) it would be impossible c) or I just didn’t have the time

Change keyboard layout to U.S. international

  1. System Preferences -> Keyboard -> Input Sources
  2. Click +
  3. Select “English” on left column
  4. Select “U.S. International - PC” on right column
  5. Click “Add”
  6. Remove other keyboard layouts from the left column

PDF Expert

Register license

Sound Control

Check “Check for updates automatically”
Register license
Preferences > Priority Devices > Output and Input
  • Check “Switch to device when” “Device is attached”
  • Reorder devices in priority list

BetterTouchTool

Register license

Terminal

Preferences > Profiles > Pro > Font

Set to Hack Regular 18 pt.

System Preferences > Security & Privacy > Privacy > Accessibility

  • BetterTouchTool.app
  • Dropbox
  • Emacs.app
  • Persephone.app
  • RescueTime
  • VLC

System Preferences > Keyboard > Shortcuts > Mission Control

Uncheck:

  • Mission Control
  • Move left a space
  • Move right a space
  • Switch to desktop 1

Roles

Installs

Desktop Applications

Text Editors

Configuration

Programming Languages

Multimedia

Fonts

Browser Plugins

Virtualization, Provisioning, Containers and System Tools

Package Managers and Build Tools

Shell

Programming Utilities

Data Systems

Configuration, Monitoring and Debugging (tag: observability)

Document Processors and Plotting

Markup Tools

Command line tools

Security

GNU Command Line Tools

  • binutils
  • coreutils
  • diffutils
  • ed
  • findutils
  • gawk
  • gnu-indent
  • gnu-sed
  • gnu-tar
  • gnu-which
  • gnutls
  • grep
  • gzip
  • screen
  • watch
  • wdiff
  • wget

Miscellaneous

Configures

Makes Google Chrome the default browser

Passwordless sudo

Puts SSH keys in place

Remaps Caps-Lock to Control

Author

Murilo Pereira

License

MIT

About

Install all your applications and configure everything the way you like it with one command

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 63.9%
  • Makefile 20.1%
  • Qt Script 13.6%
  • AppleScript 2.4%