forked from siyelo/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
192 lines (156 loc) · 5.26 KB
/
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
---
- hosts: all
vars:
applications:
- apptrap # remove associated prefs when uninstalling
- appcode
- appzapper # uninstaller
- atom # sublime without annoying popup | https://atom.io/download/mac
- bettertouchtool # window snapping. (maybe Moom is more lightweight?)
#- caffeine # prevent mac from sleeping
- cakebrew
- calibre # berks
- cyberduck # ftp, s3, openstack
- dash # totally sick API browser
- diffmerge # free visual diq
- disk-inventory-x # reclaim space on your expensive-ass Apple SSD | http://www.derlien.com/
- docker-toolbox
- docker
- flux # get more sleep
- google-chrome
- google-drive
- hipchat
- iterm2
- iconjar
- icons8
- mounty
- qlcolorcode # quick look syntax highlighting
- qlimagesize # quick look image dimensions
- qlmarkdown # quick look .md files
- qlplayground
- qlstephen # quick look extension-less text files
- qlswift
- qlvideo
- reveal
- sketch
- skype #
- sourcetree
- spotify
- steam
- virtualbox # | https://www.virtualbox.org/
- vlc
- wordpresscom
- zeplin
fonts:
- font-roboto
- font-menlo-for-powerline
#- font-sanfrancisco
- font-awesome-terminal-fonts
- font-nexa
- font-fontawesome
install_oh_my_zsh: true
brew_taps:
- caskroom/cask
- caskroom/fonts
- caskroom/versions # for sublime-text3
- homebrew/binary
- homebrew/dupes # gnu grep
- homebrew/versions
brew_utils:
# - ansible #already installed by ./mac bootstrap script
- bash # Bash 4
- coreutils # Install GNU core utilities (those that come with OS X are outdated)
- ctags
- curl
- docker # | https://docs.docker.com/installation/mac/
#- ffmpeg
- findutils # Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
- git
- mas
- openssl
- rbenv # ruby. Just installs binaries - assumes you bring in the dotfiles.
- readline
- vim
- wget
- zsh
- clang-format
zsh_path: /usr/local/bin/zsh
home: "{{ lookup('env','HOME') }}"
mas_installed_app_ids:
- 443987910 # 1Password
- 491200486 # iClarified
- 405399194 # kindle
- 604825918 # Valentina Studio
- 603117688 # CCMenu
- 407963104 # Pixelmator
- 561995913 # Color maker
- 937984704 # Amphetamine
- 1039633667 # Irvue
- 1037126344 # Apple Configurator 2
- 803453959 # Slack
- 497799835 # Xcode
roles:
- name: geerlingguy.mas
when: mas_installed_app_ids
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: Install required Homebrew Taps
shell: brew tap {{ item }}
with_items: "{{ brew_taps }}"
- name: Check homebrew-cask is installed
stat: path=/usr/local/bin/brew-cask.rb
register: brew_cask_installed
- name: Install homebrew-cask
shell: brew install cask
when: brew_cask_installed.stat.exists == false
### 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') }}"
### fonts
- name: Install programmer fonts
shell: curl -L https://github.com/hbin/top-programming-fonts/raw/master/install.sh | bash
- name: Install fonts with brew-cask
shell: brew cask install {{ item }}
with_items: "{{ fonts }}"
when: "{{ item not in installed_applications.results|map(attribute='stdout') }}"
### 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