Using configuration management at home

During my wife’s recent trip to the east coast I decided I would take my circa 2015 macbook and fully automate it and manage it with a configuration management software. You might want to know what kind of sick puppy would do this intentionally {me}. Here was my thinking:

  1. As a manager, I don’t get to do as much hands on work as I’d like
  2. I’m frustrated by the config drift I have at home…everything is a snowflake
  3. I wanted to learn CHEF more on that later

Why CHEF? I wanted to use the same technology we use at work. Unfortunately, I did not find many current examples of folks using chef to manage their own personal machines. I did experiment with the excellent examples by jtimberman and echohack, but in the case of Joshua’s repo, it hasn’t changed in about 5 years and echohack’s in a MVP.

In the end, I found a ton of folks using Ansible for their daily drivers. Since I’m relatively proficient with CHEF on Windows, I ventured into the unknown with Ansible/Mac (#GrowthMindset). I might even make some new friends with our Networking team due to the python orientation of Ansible.

I started out with Richard van den Brand’s blog post and particularly liked the simplicity and manipulation of OS X features such as the dock. Ultimately I forked & implemented Jeff Geerling’s repo as I preferred his organization and expandability. With Jeff’s implementation you will really only need to modify the default.config.yml file. I added a to bootstrap my process. This would enable me to manage the entire process even before homebrew/git were set up.

bash <(curl -Ls

The only pain point I never quite figured out was installing xcode…Although several folks provide methods to silently install, it never seemed to work for me on Sierra (10.12.5).

I invested about 12 hours into this process and now my mac (this mac) is fully managed via my github repo and ansible. Here’s a short video of the bootstrapping process (IRL: 15 minutes, condensed to 15 seconds)

Tagged in: