Mac Build (using Ansible)
Artwork courtesy of Apple
Introduction
The goal of this project is fully automate macOS workstation using Ansible.
I have currently implemented the following:
-
macOS & Software Defaults: Updating of plist properties for various
aspects of macOS and software configuration. This uses a custom plist module
which allows for complex updates of plist files far beyond the defaults
command. The plist module is a modified version of
Matthias Neugebauer's plist module.
-
Unix Package Installation: This is being accomplish with the use of
homebrew.
-
Development Setup: Installation and configuration of technologies
such as Python, Node.js and Docker.
-
Desktop Application Installation: This is being performed with the use
of homebrew-cask.
-
Appstore Application Check: Perform a check to see if the app is
installed, and notify the user that they must install it from the App Store if it isn't.
-
Configuration Files & Symlinks: Any files and folders that are to be
copied or symlinked, including app settings, licenses and dotfiles.
-
Dock Configuration: Automatic building of the Dock using
dockutil.
-
Launchpad Configuration: Automatic building of Launchpad layout
using my own developed utility (see
launchpad.py).
-
Default Apps: File associations for various applications using
duti.
-
Startup Setup: Ensures that the required items start on startup using
loginitems.
-
Terminal Customisation: Setting up the Terminal using JXA.
Quick Start
Before you get started, you may wish to perform the following steps to save
time and ensure everything works as expected:
- Copy a Homebrew cache backup to
~/Library/Caches/Homebrew
- Copy App Store apps that you have previously downloaded to
/Applications
- Copy
System Automation
containing various settings and licenses to ~/Documents
- Install Apple's Command Line Tools manually to avoid them being re-downloaded
Now, run the following in your Terminal to use my configuration:
git clone https://github.com/fgimian/macbuild.git
cd macbuild
./macbuild.sh
It is strongly suggested that you reboot your Mac after the first run
of this tool.
If you wish to install the various sample libraries and sound packs, connect
one of your backup drives and run the following:
./extras/samples.py
Manual Tasks
The following tasks must be performed manually as I have yet to find a way to
automate them.
Installation & Configuration (macOS)
-
Finder: Setup sidebar containing favourites
-
Services: In System Preferences / Keyboard / Services, enable 'New Terminal at Folder' and 'New Terminal Tab at Folder'
-
Screen Saver: Set the screen saver to 'Flurry'
-
Notification Centre: Set the order of items and allow permission
-
Safari: Install extensions (1Password and Adblock Plus)
-
App Store Login Items: Start App Store menubar apps and set them to start
at login (AppCleaner and OneDrive)
-
Keyboard Shortcuts: Under System Preferences / Keyboard:
- Set 'Show Launchpad' to F14 under 'Launchpad & Dock'
- Set 'Show Notification Center' to F15 under 'Mission Control'
- Set 'Show Desktop' to F13 under 'Mission Control'
- Disable 'Show Dashboard' under 'Mission Control'
Installation & Configuration (General)
-
Audio Hijack: Start the app multiple times to dismiss welcome and mailing
list alerts. You must also install Instant On to ensure the app works.
-
Clear: Enable iCloud
-
Focus: Start Focus manually as it won't initialise successfully with
launchd starting it for the first time.
-
Dropbox: Disable camera uploads
-
Forklift: Sidebar containing favourites and view settings
-
World Clock: Country selection settings
Installation & Configuration (Music Production)
-
Ableton Live Suite: Preferences including skin selection
-
Ableton Sample Packs: Installation of Ableton Live sounds
-
Apple Logic Pro X: Preferences and key bindings
-
Steinberg Cubase Pro: Preferences and key bindings
-
Default Plug-in Presets: Setup default presets for your most used VST
effects and instruments
Manual Licensing
-
Microsoft Office
-
Cytomic The Drop & The Glue
-
LennarDigital Sylenth1
-
Native Instruments Komplete
-
Novation Bass Station
Software Deactivation
The following software should be deactivated before re-installing macOS:
-
Celemony Melodyne Editor
-
LennarDigital Sylenth1
References
Projects
Frameworks
Blog Posts
License
Mac Build is released under the MIT license. Please see the
LICENSE file for
more details. Feel free take what you like and use it in your own Ansible
scripts.