Firstly I'll give a bit of background about myself to give some context, My name is Andrew Townsend I have very recently joined Mindera (this week in fact) in the Leicester - UK office. Previously I had been working for an E-learning platform provider for the last 8 years using both Windows & Linux, throughout this time I held various development heavy positions from Graduate Developer to Solutions Architect. The latter role involved a lot of hands on root cause analysis and provisioning services both on-premise and in the AWS cloud looking after the production systems.

Starting at Mindera was a nervous prospect for myself as this was once of the largest changes in my life since graduating university. Before starting with the company you are presented with a new starter form outlining the usual required details (Address/Contact details etc), there is then the required Equipment section. This is when my mind slightly went into panic mode. The only option was either a 13" MacBook Pro or the 16" variant... no Windows (& Linux) options, these options are only for the UK office there are more choices in other offices, apart from where it required to be on MacOS such as iOS development.

As I'm quite a tech enthusiast getting new technology is always exciting, looking at the design style, the specifications and the performance, however only having touch MacOS for an extremely limited amount of time previously (mainly bug checking in safari) this was making me apprehensive as this limited exposure had left a bad impression and didn't seem very usable. My initial reaction was well I'll just wipe it and install Debian as I'd been using this for the past 5+ years, on both my work machine and home machine and had been completely happy with its customisation and software availability. It was then the weekend before my lovely new kit was arriving (MacBook Pro 16" 2.6GHz 6-core Intel i7, 16GB 2666Mhz DDR4 Memory and a 512GB SSD, Magic Mouse 2 & Magic Keyboard), I thought to myself maybe I should just give MacOS a second chance start from scratch and learn its first glance oddities.

This article does assume that you have a basic level of knowledge in how to run terminal commands and Ansible.

Setting up Development Tooling

After having my first virtual office team meeting, after mentioning that this was basically my first real experience on MacOs I was pleasantly greeted by a Medium article for setting up MacBooks for web development which can be found [here](, by a kind member of the Mindera team.

After giving the article a read through and then applying some of these changes, it got me thinking on my Debian machines I just an Ansible playbook to provision my settings automatically. So why don’t I just do this for my MacBook? So I set to work, after some brief reading I’d gotten myself setup with the Brew package manager and the Ansible package.

# Install Brew Package Manager
/bin/bash -c “$(curl -fsSL"
Install Homebrew

From the article there were a few packages that I didn’t think I’d need or use so I omitted these as I went through, also included some extras that are more cloud based such as the AWS CLIi and Terraform in the end I had written a playbook that would idempotently install and configure the following Brew Cask packages:

And the following Brew packages:

  • awscli
  • docker-compose
  • git
  • htop
  • node
  • python
  • romkatv/powerlevel10k/powerlevel10k
  • terraform
  • zsh
  • zsh-syntax-highlighting
  • zsh-autosuggestions
  • zsh-history-substring-search

These have given me an almost like for like replica of my usual Debian setup. Using the Ansible Brew module is used exactly the same as the APT module, the only complication I had was making the change shell task idempotent which I solved by using the global Ansible variables to check the current shell and home directory of the current user.

In Conclusion

Now this exists as an Ansible playbook it means that if I get a new MacBook I can simply download and run this playbook and be up and running in no time It also means I can share it with my colleagues if they decide to factory reset their machine and new starters who may be in the same position as me and not having used MacOS much.

The above playbook has made the MacBook feel more like home and the environment I’m used to, I’m over the apprehension of the Apple ecosystem and ready to face the programming challenges that await. I would strongly suggest reading over the linked Medium article and my ansible playbook repository. This will hopefully get up and running with the basics, feel free to fork or suggest improvements. It is very much a work in progress repository and there are a few things I'd like to add going forward.

As a final note, thanks for taking the time to read through this blog post, I hope it and the git repository are helpful to get you started.

Automating a Mac development setup. Contribute to atownsend247/mac-dev-2020-playbook development by creating an account on GitHub.
Ansible Playbook Repository