-
Notifications
You must be signed in to change notification settings - Fork 101
/
ubuntu.yml
executable file
·352 lines (332 loc) · 10.8 KB
/
ubuntu.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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
---
- name: Preparing Workstation
hosts: localhost
connection: local
tasks:
- name: Installing Linux Apps
become: true
apt:
name: '{{ item }}'
install_recommends: yes
state: present
loop:
- vim
- htop
- curl
- wget
- ncdu
- tree
- apt-transport-https
- ca-certificates
- gnupg
- python3-pip
- make
- git
- bash-completion
- gnupg-agent
- zsh
- flameshot
- fonts-hack
- tilix
- virtualbox
- mlocate
- krita
- jq
- mtr
- block:
- name: Verify if Oh-My-zsh is installed
command: test -d /home/{{ ansible_user_id }}/.oh-my-zsh
register: ohmyzsh
ignore_errors: true
- name: Installing Oh-My-zsh
shell:
cmd: 'curl -fsL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash'
warn: false
when: ohmyzsh.rc != 0
- name: Changing Default Shell to ZSH
become: yes
user:
name: '{{ ansible_user_id }}'
shell: /bin/zsh
- name: Changing Default ZSH Theme to Agnoster
lineinfile:
path: /home/{{ ansible_user_id }}/.zshrc
regexp: '^ZSH_THEME='
line: 'ZSH_THEME="agnoster"'
- name: Creating ZSH Completion folder
file:
path: /home/{{ ansible_user_id }}/.oh-my-zsh/completions
state: directory
mode: 0755
- name: Adding autoload to compinit
lineinfile:
path: /home/{{ ansible_user_id }}/.zshrc
line: 'autoload -U compinit && compinit'
state: present
- name: Installing AWS CLI via pip3
become: true
pip:
name: awscli
executable: pip3
- block:
- name: Install Google Key
become: true
apt_key:
url: 'https://dl.google.com/linux/linux_signing_key.pub'
state: present
- name: Install Google Repository
become: true
apt_repository:
repo: 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main'
state: present
filename: google-chrome
- name: Install Google Chrome
become: true
apt:
name: google-chrome-stable
- block:
- name: Installing Vagrant 2.2.18
become: true
unarchive:
src: 'https://releases.hashicorp.com/vagrant/2.2.18/vagrant_2.2.18_linux_amd64.zip'
dest: /usr/local/bin
remote_src: yes
- block:
- name: Installing Terraform 0.12.31
become: true
unarchive:
src: 'https://releases.hashicorp.com/terraform/0.12.31/terraform_0.12.31_linux_amd64.zip'
dest: /usr/local/bin
remote_src: yes
- name: Renaming terraform12 binary
become: true
command: mv /usr/local/bin/terraform /usr/local/bin/terraform12
- name: Installing Terraform 0.13.7
become: true
unarchive:
src: 'https://releases.hashicorp.com/terraform/0.13.7/terraform_0.13.7_linux_amd64.zip'
dest: /usr/local/bin
remote_src: yes
- name: Renaming terraform13 binary
become: true
command: mv /usr/local/bin/terraform /usr/local/bin/terraform13
- name: Installing Terraform 0.14.11
become: true
unarchive:
src: 'https://releases.hashicorp.com/terraform/0.14.11/terraform_0.14.11_linux_amd64.zip'
dest: /usr/local/bin
remote_src: yes
- name: Renaming terraform14 binary
become: true
command: mv /usr/local/bin/terraform /usr/local/bin/terraform14
- name: Installing Terraform 0.15.0
become: true
unarchive:
src: 'https://releases.hashicorp.com/terraform/0.15.5/terraform_0.15.5_linux_amd64.zip'
dest: /usr/local/bin
remote_src: yes
- name: Renaming terraform15 binary
become: true
command: mv /usr/local/bin/terraform /usr/local/bin/terraform15
- name: Installing Terraform 1.0.4
become: true
unarchive:
src: 'https://releases.hashicorp.com/terraform/1.0.4/terraform_1.0.4_linux_amd64.zip'
dest: /usr/local/bin
remote_src: yes
- name: Renaming terraform1 binary
become: true
command: mv /usr/local/bin/terraform /usr/local/bin/terraform1
- block:
- name: Installing Vault 1.8.1
become: true
unarchive:
src: 'https://releases.hashicorp.com/vault/1.8.1/vault_1.8.1_linux_amd64.zip'
dest: /usr/local/bin
remote_src: yes
- block:
- name: Installing gomplate 3.9.0
become: true
get_url:
url: 'https://github.com/hairyhenderson/gomplate/releases/download/v3.9.0/gomplate_linux-amd64'
dest: /usr/local/bin/gomplate
mode: 755
- block:
- name: Installing Stern 1.11.0
become: true
get_url:
url: 'https://github.com/wercker/stern/releases/download/1.11.0/stern_linux_amd64'
dest: /usr/local/bin/stern
mode: 755
- block:
- name: Install Google Cloud SDK Key
become: true
apt_key:
url: 'https://packages.cloud.google.com/apt/doc/apt-key.gpg'
state: present
- name: Install Google Cloud SDK Repository
become: true
apt_repository:
repo: 'deb [arch=amd64] https://packages.cloud.google.com/apt cloud-sdk main'
state: present
filename: google-cloud-sdk
- name: Install Google Cloud SDK
become: true
apt:
name: google-cloud-sdk
- block:
- name: Install Microsoft Key
become: true
apt_key:
url: 'https://packages.microsoft.com/keys/microsoft.asc'
state: present
- name: Install VSCode Repository
become: true
apt_repository:
repo: 'deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main'
state: present
filename: vscode
- name: Install Visual Studio Code
become: true
apt:
name: code
- name: Install Virtual Studio Code Extensions
shell:
cmd: code --install-extension '{{ item }}'
loop:
- ms-python.python
- ms-azuretools.vscode-docker
- bbenoist.vagrant
- hashicorp.terraform
- gruntfuggly.todo-tree
- njpwerner.autodocstring
- eamodio.gitlens
- block:
- name: Install Docker Key
become: true
apt_key:
url: 'https://download.docker.com/linux/ubuntu/gpg'
state: present
- name: Install Docker Repository
become: true
apt_repository:
repo: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable'
state: present
filename: docker-ce
- name: Install Docker
become: true
apt:
name: docker-ce
- name: Adding existing user to group Docker
become: yes
user:
name: '{{ ansible_user_id }}'
groups: docker
append: yes
- name: Install Docker-Compose
become: true
get_url:
url: 'https://github.com/docker/compose/releases/download/1.26.2/docker-compose-Linux-x86_64'
dest: '/usr/local/bin/docker-compose'
mode: 755
- name: Install Docker Machine Bash Completion
become: true
get_url:
url: 'https://raw.githubusercontent.com/docker/machine/v0.16.0/contrib/completion/bash/docker-machine.bash'
dest: '/etc/bash_completion.d/docker-machine'
- name: Install Docker-Compose Bash Completion
become: true
get_url:
url: 'https://raw.githubusercontent.com/docker/compose/1.26.2/contrib/completion/bash/docker-compose'
dest: '/etc/bash_completion.d/docker-compose'
- name: Install Docker-Compose and Docker Machine Zsh Completion
lineinfile:
path: /home/{{ ansible_user_id }}/.zshrc
regexp: '^plugins='
line: 'plugins=(git docker docker-compose)'
- block:
- name: Installing Kubectl 1.22.0
become: true
get_url:
url: 'https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl'
dest: /usr/local/bin/kubectl
mode: 755
- name: Downloading Kubectx and Kubens
become: true
git:
repo: 'https://github.com/ahmetb/kubectx'
dest: /opt/kubectx
- name: Creating Symlink to kubectx and kubens
become: true
file:
src: '/opt/kubectx/{{ item }}'
dest: '/usr/local/bin/{{ item }}'
state: link
with_items:
- kubectx
- kubens
- name: Creating ZSH Completion
file:
src: '/opt/kubectx/completion/{{ item }}'
dest: '/home/{{ ansible_user_id }}/.oh-my-zsh/completions/_{{ item }}'
state: link
with_items:
- kubectx.zsh
- kubens.zsh
- block:
- name: Adding Longsleep/Golang Backports Repository
become: true
apt_repository:
repo: 'ppa:longsleep/golang-backports'
- name: Install Golang
become: true
apt:
name: golang-go
# OPTIONAL:
# - PEEK - Lightweight Screen Recorder that can export as GIF
# - OBS-STUDIO - Screen Recorder and Casting Software
# - Brave Browser - Secure web browser
# - Ulauncher - Application Launcher
- block:
- name: Adding Peek Repository
become: true
apt_repository:
repo: 'ppa:peek-developers/stable'
- name: Install Peek
become: true
apt:
name: peek
- block:
- name: Install obsproject Ubuntu Repo
become: true
apt_repository:
repo: 'ppa:obsproject/obs-studio'
- name: Install obs Studio
become: true
apt:
name: obs-studio
- block:
- name: Install Brave Key
become: true
apt_key:
url: 'https://brave-browser-apt-release.s3.brave.com/brave-core.asc'
state: present
- name: Install Brave Repository
become: true
apt_repository:
repo: 'deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main'
state: present
filename: brave
- name: Install Brave Browser
become: true
apt:
name: brave-browser
- block:
- name: Adding Ulauncher Repository
become: true
apt_repository:
repo: 'ppa:agornostal/ulauncher'
- name: Install Ulauncher
become: true
apt:
name: ulauncher