-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmachine_setup_playbook.yml
158 lines (125 loc) · 4.49 KB
/
machine_setup_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
---
- name: Install Alacritty via Homebrew
hosts: localhost
become: false
tasks:
- name: Install Dockutil
homebrew:
name: dockutil
state: present
- name: Install Alacritty
homebrew:
name: alacritty
state: present
- name: Check if Alacritty is already in the Dock
shell: dockutil --list | grep -q "/Applications/Alacritty.app"
register: alacritty_present_on_dock
ignore_errors: true
- name: Add Alacritty to the Dock if not present
shell: dockutil --add "/Applications/Alacritty.app"
when: alacritty_present_on_dock.rc != 0
- name: Install Visual Studio Code
homebrew:
name: visual-studio-code
state: present
- name: Check if Visual Studio Code is already in the Dock
shell: dockutil --list | grep -q "/Applications/Visual%20Studio%20Code.app/"
register: vscode_present_on_dock
ignore_errors: true
- name: Add Visual Studio Code to the Dock if not present
shell: dockutil --add "/Applications/Visual Studio Code.app"
when: vscode_present_on_dock.rc != 0
- name: Install Docker
homebrew:
name: docker
state: present
- name: Install Postman
homebrew:
name: postman
state: present
- name: Check if Postman is already in the Dock
shell: dockutil --list | grep -q "Postman.app"
register: postman_present_on_dock
ignore_errors: true
- name: Add Postman to the Dock if not present
shell: dockutil --add "/Applications/Postman.app"
when: postman_present_on_dock.rc != 0
- name: Install Slack
homebrew:
name: slack
state: present
- name: Check if Slack is already in the Dock
shell: dockutil --list | grep -q "Slack.app"
register: slack_present_on_dock
ignore_errors: true
- name: Add Slack to the Dock if not present
shell: dockutil --add "/Applications/Slack.app"
when: slack_present_on_dock.rc != 0
- name: Install Google Chrome
homebrew:
name: google-chrome
state: present
- name: Install Firefox Developer Edition from cask
homebrew_cask:
name: firefox@developer-edition
state: present
- name: Install Telegram from cask
homebrew_cask:
name: telegram
state: present
- name: Check if Telegram is already in the Dock
shell: dockutil --list | grep -q "Telegram.app"
register: telegram_present_on_dock
ignore_errors: true
- name: Add Telegram to the Dock if not present
shell: dockutil --add "/Applications/Telegram.app"
when: telegram_present_on_dock.rc != 0
- name: Check if Oh My Zsh is already installed
shell: test -d ~/.oh-my-zsh
register: ohmyzsh_installed
ignore_errors: true
- name: Download Oh My Zsh installation script
get_url:
url: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
dest: /tmp/install_ohmyzsh.sh
when: ohmyzsh_installed.rc != 0
- name: Run Oh My Zsh installation script
command: sh /tmp/install_ohmyzsh.sh --unattended
register: ohmyzsh_result
failed_when: "'FAILED' in ohmyzsh_result.stderr"
when: ohmyzsh_installed.rc != 0
- name: install ComicShannsMono Nerd Font from cask
homebrew_cask:
name: font-comic-shanns-mono-nerd-font
state: present
- name: Install zsh-you-should-use plugin
git:
repo: https://github.com/MichaelAquilina/zsh-you-should-use.git
dest: ~/.oh-my-zsh/custom/plugins/you-should-use
- name: Install zsh-autosuggestions plugin
git:
repo: https://github.com/zsh-users/zsh-autosuggestions
dest: ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
- name: Install tunnelblick from cask
homebrew_cask:
name: tunnelblick
state: present
- name: Install Alfred from cask
homebrew_cask:
name: alfred
state: present
- name: Install macDown from cask
homebrew_cask:
name: macdown
state: present
- name: Install Discord from cask
homebrew_cask:
name: discord
state: present
- name: Check if Discord is already in the Dock
shell: dockutil --list | grep -q "Discord.app"
register: discord_present_on_dock
ignore_errors: true
- name: Add Discord to the Dock if not present
shell: dockutil --add "/Applications/Discord.app"
when: discord_present_on_dock.rc != 0