forked from siyelo/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-playbook.yml
271 lines (222 loc) · 8.66 KB
/
example-playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
---
- hosts: all
vars:
applications:
- 1password
#- adium
- alfred # | http://www.alfredapp.com
#- anvil # run sites locally
- apptrap # remove associated prefs when uninstalling
- appzapper # uninstaller
#- atom # sublime without annoying popup | https://atom.io/download/mac
- bettertouchtool # window snapping. (maybe Moom is more lightweight?)
#- betterzipql # quick look for zips
#- bodega # a less-shit mac store
#- caffeine # prevent mac from sleeping
#- calibre # berks
- carbon-copy-cloner # backups | https://bombich.com/download
- cheatsheet # know your shortcuts
#- cord # RDP remote control
- cyberduck # ftp, s3, openstack
- dash # totally sick API browser
#- deeper # (w/ onyx) turn on hidden functions
- diffmerge # free visual diq
- disk-inventory-x # reclaim space on your expensive-ass Apple SSD | http://www.derlien.com/
- dropbox # a worse Mega Sync
- eve # learn your shortcuts
#- evernote
#- fing # network diagnostics
- firefox
- flux # get more sleep
- google-chrome
#- google-drive
#- handbrake # vid compression
- imageoptim # optimize images
- istumbler # network discovery GUI
#- iterm2
- jumpcut # awesome clipboard
- karabiner # Keyboard customization
#- keka # file archiving
- licecap # GIFs !
- little-snitch # awesome outbound firewall
#- mactracker # benchmarking
#- macvim # a shittier vim
- megasync # a better Dropbox
- monolingual # remove unneeded osx lang files
#- namechanger # rename files in bulk
#- nosleep # prevent mac from sleeping when closing lid
- nvalt # fast note taking
#- onyx # system maintenance
#- packer # machine images
- qlcolorcode # quick look syntax highlighting
- qlimagesize # quick look image dimensions
- qlmarkdown # quick look .md files
- qlstephen # quick look extension-less text files
#- rcdefaultapp # set default app for different URLs
- rowanj-gitx # Awesome gitx fork.
#- seil # Keyboard customization
- sequel-pro # FREE SQL GUI!
- shortcat # kill your mouse
- shuttle # ssh management
#- skitch
- skype #
- sublime-text3 # (experimental cask) | http://www.sublimetext.com/
#- subtitles # auto download subtitles
- thunderbird # email
- tomighty # pomodoro
- torbrowser # be the noise
#- tower # another git client
- transmission # torrents
#- transmit # ftp
- tunnelblick # VPN
- vagrant # | https://www.vagrantup.com/downloads.html
- vagrant-manager #
- virtualbox # | https://www.virtualbox.org/
- vlc
#- xtrafinder # moar Finder!
#- zoomus # better videoconferences
install_oh_my_zsh: true
brew_taps:
- caskroom/cask
- caskroom/versions # for sublime-text3
dotfile_repo_username: glennr # the GH repo where your dotfiles are
brew_utils:
# - ansible #already installed by ./mac bootstrap script
- autoconf
- autojump # quickly navigate from cmd line
- bash # Bash 4
- boot2docker # for running docker on osx
- cowsay # amazing
- coreutils # Install GNU core utilities (those that come with OS X are outdated)
#- ctags
- docker # | https://docs.docker.com/installation/mac/
#- ffmpeg
- findutils # Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
- git
- go
- gpg
#- homebrew/dupes/grep # more recent version of OS X grep # ansible bug: https://github.com/ansible/ansible-modules-extras/issues/252
- hub # github
#- imagemagick # IDK why, but I always end up needing this beast
- keybase # in alpha at time of writing.
#- mercurial # Used to need it for golang src builds. Who knows, might come in handy again.
#- mongodb # a shittier PG
- mtr # better traceroute
#- mysql # required PHP library
- node
- npm
- openssl
- packer
# - phantomjs
- postgresql # yes and nosql
- python
- rbenv # ruby. Just installs binaries - assumes you bring in the dotfiles.
- readline
- redis
- rename # rename multiple files
- rsync
- ruby-build
- sqlite # production rails DB
- the_silver_searcher # fast ack-grep
- tmux
- vim
- wget
- zsh
zsh_path: /usr/local/bin/zsh
home: "{{ lookup('env','HOME') }}"
tasks:
- name: Check Homebrew is installed
stat: path=/usr/local/bin/brew
register: brew_installed
- name: Install Homebrew
shell: ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
when: brew_installed.stat.exists == false
- name: Instal required Homebrew Taps
shell: brew tap {{ item }}
with_items: "{{ brew_taps }}"
### UTILS
- name: Install libraries/utils with homebrew
homebrew: name={{ item }} state=present
with_items: "{{brew_utils}}"
- name: Cleanup after brewing
shell: brew cleanup
### APPZ
- name: Check for installed apps(casks)
shell: brew cask list | grep {{ item }}
register: installed_applications
with_items: "{{applications}}"
ignore_errors: true
- name: Install Apps with brew-cask
shell: brew cask install {{ item }}
with_items: "{{applications}}"
when: "{{ item not in installed_applications.results|map(attribute='stdout') }}"
# Caveats: megasync only works if called from /Applications
- name: Linking MEGASync with brew-cask
shell: ln -s '/opt/homebrew-cask/Caskroom/megasync/latest/MEGAsync.app' '/Applications/MEGAsync.app'
when: "'megasync' in applications"
ignore_errors: true # hacky
### ZSH radness
- name: Determine if zsh is default/current shell
shell: echo $SHELL
register: current_shell
- name: Enable zsh in /etc/shells
shell: sudo /bin/sh -c 'grep -q "{{ zsh_path }}" /etc/shells || echo "{{ zsh_path }}" >> /etc/shells'
when: current_shell.stdout != '/usr/local/bin/zsh'
#" unbreak my syntax highlighting...
- name: Set zsh as default shell
shell: chsh -s {{ zsh_path }}
when: current_shell.stdout != '/usr/local/bin/zsh'
sudo: true
- name: Use GNU tools instead of osx counterparts (grep find etc)
shell: echo 'export PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH' >> ~/.zshrc
- name: Install oh-my-zsh
git: repo=https://github.com/robbyrussell/oh-my-zsh dest=~/.oh-my-zsh
sudo: false
when: install_oh_my_zsh == true
tags: install_oh_my_zsh
### OSX SETTINGS
- name: Configure System Settings
script: scripts/system_settings.sh
sudo: true
### DOTFILES
- name: Check rcm is installed
stat: path=/usr/local/bin/rcup
register: rcm_installed
- name: Install rcm for dotfiles management
shell: brew tap thoughtbot/formulae && brew install rcm
when: rcm_installed.stat.exists == false
- name: Check ~/src dir exists
stat: path=~/src/
register: src_dir_exists
- name: Assures ~/src dir exists
file: path=~/src state=directory
- name: Assures ~/src/thoughtbot dir exists
file: path=~/src/thoughtbot state=directory
- name: Install thoughtbot/dotfiles
git: repo=https://github.com/thoughtbot/dotfiles.git dest=~/src/thoughtbot/dotfiles
- name: Link ~/dotfiles to ~/src/thoughtbot/dotfiles
file: dest=~/dotfiles
src=~/src/thoughtbot/dotfiles
state=link
force=yes
- name: Assures ~/src/{{ dotfile_repo_username }} dir exists
file: path=~/src/{{ dotfile_repo_username }} state=directory
- name: Install {{ dotfile_repo_username }}/dotfiles
git: repo=https://github.com/{{ dotfile_repo_username }}/dotfiles.git dest=~/src/{{ dotfile_repo_username }}/dotfiles
- name: Link ~/dotfiles-local to ~/src/{{ dotfile_repo_username }}/dotfiles
file: dest=~/dotfiles-local
src=~/src/{{ dotfile_repo_username }}/dotfiles
state=link
force=yes
- name: Generate dotfiles with rcup
shell: env RCRC=~/dotfiles/rcrc rcup
## POST INSTALL STEPS / Cask gotchas
#
# require manual intervention!
#
- name: Run Little Snitch Installer
shell: open /opt/homebrew-cask/Caskroom/little-snitch/3.5.3/Little\ Snitch\ Installer.app
when: "'little-snitch' in applications"
- name: Run Monolingual
shell: open ~/Applications/Monolingual.app
when: "'monolingual' in applications"