Dan Bohea
...as much as we can.
For the most part this is an opinionated Ansible playbook that is in no way intended for use by anyone other than myself and as such is currently unsupported.
bower
generator-ctools-layout
generator-drupalmodule
grunt-cli
gulp
yo
bfg
duti
Git
Git Extras
LastPass CLI
node.js
tree
ansible-lint
mkdocs
passlib
Alfred
AppCleaner
aText
Atom
Bartender
BetterTouchTool
Caffeine
Cakebrew
Crashplan
DaisyDisk
Dash
Doxie
Dropbox
Evernote
f.lux
Firefox
Flash Player
Google Chrome
Google Drive
Google Hangouts
Google Plus Auto Backup
Handbrake
Hazel
HipChat
ImageOptim
iStat Menus
iTerm2
Kaleidoscope
Keyboard Maestro
LibreOffice
LimeChat
Moom
Name Mangler
OmniGraffle
Opera
Opera Mobile Emulator
Parallels Desktop
Path Finder
Postbox
Sequel Pro
Sketch
Sketch Tool
Sketch Toolbox
SketchUp
Skitch
Skype
Steam
The Unarchiver
Tower
Transmission
Transmit
Vagrant
VirtualBox
VLC
VMware Fusion
xScope
* excluding Quick Look plugins
betterzipql
qlcolorcode
qlmarkdown
qlprettypatch
qlstephen
quicklook-csv
quicklook-json
suspicious-package
webpquicklook
.bash_aliases
.bash_profile
.duti
.gitconfig
.gitignore_global
afterglow-monokai-syntax
atom-beautify
autocomplete-plus
autocomplete-sass
bottom-dock
double-tag
emmet
file-icons
git-plus
git-time-machine
grunt-manager
gulp-manager
highlight-line
highlight-selected
isotope-ui
language-ansible
language-patch
linter
linter-ansible-linting
linter-manager
open-terminal-here
pigments
project-manager
sort-lines
split-diff
svg-preview
todo-manager
travis-ci-status
Activity Monitor
Calendar
Dock
Finder
General UI & UX
Mission Control
Safari & Webkit
Screen
Spotlight
SSD
Terminal
TextEdit
Time Machine
Trackpad & mouse
App preferences
Associates file types
with apps
Composer
Custom spelllingz
Directory structures
Dock apps
known_hosts
Login Items
Project Git repos
Symlinks
Sketch plugins
Vagrant plugins
* "40 Mbps down" internet connection
Adobe CC app installs
Apple App Store app installs
Enter license details
Sign in to apps
SSH keys
Time Machine exclusions
Install a LAMP stack
Install Drush
Install Sass etc.
*if I don't overrun again
Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to macOS applications and large binaries alike.
3210 Casks maintained by 422 contributors.
bplist00�
Xlocation^nightColorTemp_WebKitDefaultFontSize\locationTypeXlateLock_SULastCheckTimeWversion]lateColorTemp_locationTextField_WebKitStandardFontXwakeTime_50.976297,-2.838684
�QL3A����#@����"�7Wta126bu_.Lucida Grande UI�(7O\ew�������������
$ defaults read org.herf.Flux
{
SULastCheckTime = "2016-03-01 17:00:00 +0000";
WebKitDefaultFontSize = 11;
WebKitStandardFont = ".Lucida Grande UI";
lateColorTemp = "3430.46215160473";
lateLock = 0;
location = "50.976297,-2.838684";
locationTextField = ta126bu;
locationType = L;
nightColorTemp = 3500;
version = 3;
wakeTime = 480;
}
# Print all of the user's defaults
defaults read
# Print user defaults for the "org.herf.Flux" domain
defaults read org.herf.Flux
# Set dock orientation to "Left"
defaults write com.apple.dock orientation -string "left"
- name: Set late colour temperature
osx_defaults:
domain: org.herf.Flux
key: lateColorTemp
type: int
value: 3500
# Contents of .my_prefs:
# Example using UTI
com.github.atom public.source-code all
# Example using file extension
org.m0k.transmission .torrent all
A Uniform Type Identifier (UTI) is a text string used on software provided by Apple Inc. to uniquely identify a given class or type of item.
# Run duti with preferences file
duti .my_prefs
duti -e .png
identifier: public.png
description: Portable Network Graphics image
declaration: {
UTTypeIdentifier = public.png
UTTypeDescription = Portable Network Graphics image
UTTypeConformsTo = public.image
UTTypeTagSpecification = {
com.apple.ostype = PNGf
public.mime-type = image/png
com.apple.nspboard-type = Apple PNG pasteboard type
public.filename-extension = png
}
}
-e option (undocumented as of 1.5.2):
Retrieves the UTI declaration associated with a specified filename extension.
On the control machine :O
On a second Mac
Virtual machines
Automated tests
Has a macOS build environment
Xcode + Command Line Tools pre-installed
macOS 10.9, 10.10 & 10.11 available
Homebrew pre-installed
Avoid testing:
lower priority, less unique Cask apps to reduce log verbosity & build time issues.
Installs Homebrew & Homebrew Cask on macOS.
Example of app role on Galaxy
Prefs available to override via default vars
Provides "killall" handler
CI tests
# tasks/main.yml
- name: Install Skype.
homebrew_cask: name=skype state=present
environment:
HOMEBREW_CASK_OPTS: --appdir="{{ skype_appdir }}"
notify: brew cask cleanup
- name: Set default dialpad window visibility.
osx_defaults:
domain: com.skype.skype
key: DialpadOpen
type: int
value: "{{ skype_DialpadOpen }}"
notify:
- killall Skype
- name: Set default contacts view mode.
osx_defaults:
domain: com.skype.skype
key: ContactListViewMode
type: int
value: "{{ skype_ContactListViewMode }}"
notify:
- killall Skype
# defaults/main.yml
skype_appdir: "/Applications"
skype_DialpadOpen: 0
skype_ContactListViewMode: 1
# handlers/main.yml
- name: killall Skype
command: killall Skype
ignore_errors: yes
DRYer way to batch install smaller packages via their respective package managers.
# tasks/main.yml
- name: Install global node packages
npm:
name: "{{ item }}"
global: yes
with_items: "{{ node_pkgs_list }}"
# defaults/main.yml
node_pkgs_list:
- bower
- generator-ctools-layout
- generator-drupalmodule
- grunt-cli
- gulp
- yo
Designed to be used multiple times in the same play.
Simple, DRY way to install an app.
Allows for per-app tags.
Ensures app symlinks are generated in /Applications.
Doesn't handle app prefs.
# tasks/main.yml
- name: Install {{ name }} to {{ cask_app_appdir }}
homebrew_cask: name={{ name }} state=present
environment:
HOMEBREW_CASK_OPTS: --appdir={{ cask_app_appdir }}
notify: brew cask cleanup
# meta/main.yml
# 'allow_duplicates' is required to allow this role to be run as a dependency
# more than once in the same play.
allow_duplicates: yes
dependencies:
- danbohea.homebrew
# Example of cask_app usage in playbook
- { name: "dropbox", tags: ["dropbox"], role: cask_app }
- { name: "phpstorm", tags: ["phpstorm"], role: cask_app }
# tasks/main.yml
- name: Wipe all default app icons from the Dock
command: defaults write com.apple.dock persistent-apps -array
notify: killall Dock
# - Only adds apps to the Dock that are already installed
- name: Add applications to Dock
command: >
defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/{{ item }}</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
with_items: "{{ dock_apps | intersect(installed_apps.stdout_lines) }}"
notify: killall Dock
# defaults/main.yml
dock_apps:
- Path Finder.app
- Dash.app
- Skype.app
- Google Chrome.app
- Evernote.app
# installed_apps/tasks/main.yml
# Command uses `basename` to return only filenames (excludes paths)
# Source: http://superuser.com/a/620591
- name: Get list of .app files in /Applications
command: find . -depth 1 -name "*.app" -exec basename {} \;
args:
chdir: /Applications
register: installed_apps
changed_when: false
Abstract roles to Ansible Galaxy where possible.
Galaxy role per configurable app:
Galaxy roles for common macOS features e.g
Dan Bohea