A YAAP (yet another ansible playbook) for setting up a macbook for development work, loosely derived from the great geerlingguy's work, both from his mac dev playbook and his ansible collection for mac
It might fit your needs, but definitely fits mine, so feel free to either use it as-is, derive your own work from it, or fork it and hack away with what you might require for your specific needs. I'm happy to take PRs for fixes when run on your machine or other potential tools that might be good to have but selfishly it's main purpose of this repository is for me, myself and I.
All the requirements can be found by the pre-install.sh script that tries to install XCode Developer tools and Ansible inside pipx to try and clean it up from the system's python installation.
Unfortunately i cannot test on this Mac due to homebrew being already installed and hijacking the systems python interpreter for its own (which is a good thing!) and i'm too lazy to test with the MacOS baked in version. Maybe another time or the inevitable reimage that will come at some point
A loose list of major tasks is as follows:
- Homebrew installation with typical casks and formulas
- MacOS Dock modification
- VS Code configuration for extensions and custom config
- Git configuration
- Shell and iTerm configuration
To see the list of tools and configs, have a look at default.config.yml to see whats going on
Alas with MacOS, there are a couple of post-run steps that need to be done manually. I'm sure they can be automated to a point, but there are diminishing returns for the actions so it's simpler to do it yourself. These are:
-
1Password authentication for
opand setting up ssh agent configMake sure you boot up 1Password application and authenticate as normal. Once done, open settings and head to the developers group to set up ssh agent and the
opbridge. When setting up the SSH agent, let 1Password change your ssh_config for the proxy command. It knows best over you and shouldn't conflict with the SSH configuration stepsOnce done, test by authenticating to github via ssh (
ssh -T github.com) with the key associated in 1Password. As well, test theopbridge by signing in usingop signin. If successfull you'll get an output usingop whoami -
Dock configuration
The steps in the
geerlingguy.mac.dockwhich kills and waits for the dock sometimes works, but if its looking strange just make sure you manually kill the dock viakillall Dock -
Set up the
codesymlinkWhile the Visual Studio task within this playbook doesn't require the
codesymlink to be set up, it might be useful for you. Unfortunately there is no simple way to do it programmatically so booting up in VS Code and heading to the command pallete (Cmd+Shift+P) and searching forShell Command: install 'code' command in your PATHwill run the oasscript built-in. Again, it knows better than you to manually add it to your path!
Sam Sherar
MIT