-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
63 lines (58 loc) · 1.42 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
---
- hosts: all
vars:
applications:
- 1password
- bitbar
- discord
- disk-inventory-x
- firefox
- flux
- google-chrome
- itsycal
- keybase
- oversight
- rocket
- slack
- spotify
- sublime-text
- vanilla
- vlc
brew_taps:
- caskroom/cask
- caskroom/versions # for sublime-text3
brew_utils:
- autojump
- bash
- bash-completion2
- findutils
- git
- gnupg
- moreutils
- nmap
- pycodestyle
- ssh-copy-id
- thefuck
home: "{{ lookup('env', 'HOME' }}"
tasks:
- name: HOMEBREW | Install required Taps
shell: /usr/local/bin/brew tap {{ item }}
with_items: "{{ brew_taps }}"
- name: UTILS | Install
homebrew:
name: "{{ item }}"
state: present
with_items: "{{ brew_utils }}"
- name: UTILS | Cleanup
shell: /usr/local/bin/brew cleanup
- name: CASKS | load list
shell: /usr/local/bin/brew cask list | grep {{ item }}
register: installed_applications
with_items: "{{ applications }}"
ignore_errors: true
- set_fact:
installed_applications: "{{ installed_applications.results|map(attribute='stdout') }}"
- name: CASKS | install
shell: /usr/local/bin/brew cask install {{ item }}
with_items: "{{ applications }}"
when: item not in installed_applications