-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmystation.yml
451 lines (425 loc) · 13.4 KB
/
mystation.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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
- name: Preparing workstation
hosts: localhost
become: true
connection: local
vars:
vbox_extpack_version: "7.1.6"
tasks:
- name: Update apt cache
apt:
update_cache: yes
- name: Create user
user:
name: convidado
shell: /bin/bash
create_home: yes
- name: Set alias preferences
lineinfile:
path: /etc/bash.bashrc
line: "{{ item }}"
state: present
loop:
- 'alias gs="git status"'
- 'alias ga="git add"'
- 'alias gc="git commit -m"'
- 'alias gp="git push"'
- 'alias gl="git log --oneline"'
- 'alias ll="ls -l"'
- 'alias la="ls -la"'
- 'alias update="sudo apt update && sudo apt upgrade && sudo apt full-upgrade && sudo apt autoremove && sudo apt autoclean"'
- 'alias inet="ip -br -c a"'
- 'alias dt="date +%H:%M"'
- 'alias k=kubectl'
- 'source <(kubectl completion bash)'
- 'complete -o default -F __start_kubectl k'
- name: Configure vim settings
blockinfile:
path: /etc/vim/vimrc
block: |
set expandtab
set tabstop=2
set shiftwidth=2
marker: ""
- name: Configure neofetch to run at terminal startup
lineinfile:
path: ~/.bashrc
line: 'neofetch'
state: present
- name: Customize neofetch settings
blockinfile:
path: ~/.config/neofetch/config.conf
create: yes
block: |
print_info() {
info title
info underline
info "OS"
info "Host"
info "Kernel"
info "Uptime"
info "Packages"
info "Shell"
info "Resolution"
info "DE"
info "WM"
info "Terminal"
info "CPU"
info "Memory"
}
- name: Install Orchis theme dependencies
apt:
name:
- gtk2-engines
- gnome-themes-extra
- sassc
state: present
- name: Download Orchis theme
get_url:
url: https://github.com/vinceliuice/Orchis-theme/archive/refs/tags/2024-11-03.tar.gz
dest: /tmp/Orchis-theme.tar.gz
mode: '0755'
- name: Extract Orchis theme
unarchive:
src: "/tmp/Orchis-theme.tar.gz"
dest: "/tmp"
remote_src: yes
- name: Install Orchis theme
shell: "cd /tmp/Orchis-theme-2024-11-03 && ./install.sh -t orange --tweaks macos"
- name: Clean up files and directories
file:
path: "{{ item }}"
state: absent
loop:
- "/tmp/Orchis-theme-2024-11-03"
- "/tmp/Orchis-theme.tar.gz"
- name: Install Linux apps
apt:
name: '{{ item }}'
install_recommends: yes
state: present
loop:
- apt-transport-https
- bash-completion
- ca-certificates
- color-picker
- curl
- filezilla
- flameshot
- flatpak
- fonts-hack
- gdebi
- git
- gnome-font-viewer
- gnupg
- gnupg-agent
- htop
- jq
- libarchive-tools
- libguestfs-tools
- make
- mlocate
- mtr
- ncdu
- net-tools
- network-manager-l2tp
- network-manager-l2tp-gnome
- neofetch
- nmap
- openssh-client
- openssh-server
- preload
- python3-pip
- rclone
- rsync
- steam
- tilix
- tree
- ubuntu-restricted-extras
- vim
- vlc
- wget
- xl2tpd
- xrdp
- name: Install AWS CLI via pip3
pip:
name: awscli
executable: pip3
- name: Install balenaEtcher
get_url:
url: 'https://github.com/balena-io/etcher/releases/download/v1.19.25/balenaEtcher-1.19.25-x64.AppImage'
dest: /usr/local/bin/balena
mode: '0755'
- name: Install Winbox 4.0beta16
unarchive:
src: 'https://download.mikrotik.com/routeros/winbox/4.0beta16/WinBox_Linux.zip'
dest: /usr/local/bin
remote_src: yes
- name: Create symbolic link for Winbox 4.0beta16
file:
src: /usr/local/bin/WinBox
dest: /usr/local/bin/winbox
state: link
- name: Download and install VirtualBox GPG key
shell: curl -fsSL https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor -o /etc/apt/keyrings/virtualbox.gpg
args:
creates: /etc/apt/keyrings/virtualbox.gpg
- name: Add VirtualBox repository
apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/virtualbox.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib\n"
state: present
filename: virtualbox
update_cache: yes
- name: Install VirtualBox and dependencies
apt:
name:
- virtualbox-7.1
- cpu-checker
- libvirt-clients
state: present
- name: Add user to vboxusers group
user:
name: "{{ lookup('env', 'USER') }}"
groups: vboxusers
append: yes
- name: Check if Extension Pack is installed
shell: "vboxmanage list extpacks | grep 'Oracle VirtualBox Extension Pack'"
register: extpack_check
changed_when: false
failed_when: false
- name: Remove existing Extension Pack
shell: "echo y | VBoxManage extpack uninstall 'Oracle VirtualBox Extension Pack'"
when: extpack_check.rc == 0
ignore_errors: yes
- name: Download VirtualBox Extension Pack
get_url:
url: "https://download.virtualbox.org/virtualbox/{{ vbox_extpack_version }}/Oracle_VirtualBox_Extension_Pack-{{ vbox_extpack_version }}.vbox-extpack"
dest: "/tmp/Oracle_VirtualBox_Extension_Pack-{{ vbox_extpack_version }}.vbox-extpack"
mode: '0644'
- name: Install VirtualBox Extension Pack
shell: "echo y | VBoxManage extpack install --replace /tmp/Oracle_VirtualBox_Extension_Pack-{{ vbox_extpack_version }}.vbox-extpack"
args:
creates: "/usr/lib/virtualbox/ExtensionPacks/Oracle_VirtualBox_Extension_Pack"
- name: Clean up Extension Pack download
file:
path: "/tmp/Oracle_VirtualBox_Extension_Pack-{{ vbox_extpack_version }}.vbox-extpack"
state: absent
- name: Download and install HashiCorp GPG key
shell: curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /etc/apt/keyrings/hashicorp.gpg
args:
creates: /etc/apt/keyrings/hashicorp.gpg
- name: Add hashicorp repository
apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/hashicorp.gpg] https://apt.releases.hashicorp.com jammy main\n"
state: present
filename: hashicorp
update_cache: yes
- name: Install Vagrant, Packer and Terraform
apt:
name:
- vagrant
- packer
- terraform
state: latest
- name: Download and install Google Chrome GPG key
shell: curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google-chrome.gpg
args:
creates: /etc/apt/keyrings/google-chrome.gpg
- name: Add Google Chrome repository
apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] https://dl.google.com/linux/chrome/deb/ stable main\n"
state: present
filename: google-chrome
update_cache: yes
- name: Install Google Chrome
apt:
name: google-chrome-stable
state: present
- name: Download and install vscode GPG key
shell: curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/keyrings/microsoft.gpg
args:
creates: /etc/apt/keyrings/microsoft.gpg
- name: Add vscode repository
apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main\n"
state: present
filename: vscode
update_cache: yes
- name: Install vscode
apt:
name: code
state: present
- name: Install vscode extensions
become: false
shell: code --install-extension {{ item }} --no-sandbox --user-data-dir=/home/$USER/.vscode
loop:
- bbenoist.vagrant
- dracula-theme.theme-dracula
- bceskavich.theme-dracula-at-night
- equinusocio.vsc-material-theme-icons
- foxundermoon.shell-format
- GitHub.copilot
- hashicorp.terraform
- kennylong.kubernetes-yaml-formatter
- ms-azuretools.vscode-docker
- ms-python.autopep8
- ms-python.python
- njpwerner.autodocstring
- PKief.material-icon-theme
- Postman.postman-for-vscode
- streetsidesoftware.code-spell-checker
- streetsidesoftware.code-spell-checker-portuguese
- name: Download and install AnyDesk GPG key
shell: curl -fsSL https://keys.anydesk.com/repos/DEB-GPG-KEY | gpg --dearmor -o /etc/apt/keyrings/anydesk.gpg
args:
creates: /etc/apt/keyrings/anydesk.gpg
- name: Add AnyDesk repository
apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/anydesk.gpg] http://deb.anydesk.com/ all main\n"
state: present
filename: anydesk
update_cache: yes
- name: Install AnyDesk
apt:
name: anydesk
state: present
- name: Download and install Spotify GPG key
shell: curl -fsSL https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/spotify.gpg
args:
creates: /etc/apt/keyrings/spotify.gpg
- name: Add Spotify repository
apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/spotify.gpg] http://repository.spotify.com stable non-free\n"
state: present
filename: spotify
update_cache: yes
- name: Install Spotify
apt:
name: spotify-client
state: present
- name: Download and install Ulauncher GPG key
shell: curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xFAF1020699503176" | gpg --dearmor -o /etc/apt/keyrings/ulauncher.gpg
args:
creates: /etc/apt/keyrings/ulauncher.gpg
- name: Add Ulauncher repository
apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/ulauncher.gpg] http://ppa.launchpad.net/agornostal/ulauncher/ubuntu jammy main\n"
state: present
filename: ulauncher
update_cache: yes
- name: Install Ulauncher
apt:
name: ulauncher
state: present
- name: Download Tor Browser
get_url:
url: https://dist.torproject.org/torbrowser/14.0.4/tor-browser-linux-x86_64-14.0.4.tar.xz
dest: "/opt/tor-browser.tar.xz"
mode: '0644'
validate_certs: no
- name: Extract Tor Browser
unarchive:
src: "/opt/tor-browser.tar.xz"
dest: "/opt"
remote_src: yes
mode: '0644'
- name: Change ownership and permissions of Tor Browser directory
file:
path: "/opt/tor-browser"
owner: "{{ lookup('env', 'USER') }}"
group: "{{ lookup('env', 'USER') }}"
mode: '0755'
recurse: yes
- name: Make the startup script executable
file:
path: "/opt/tor-browser/start-tor-browser.desktop"
mode: '0755'
- name: Register Tor Browser as an application
shell: "cd /opt/tor-browser && ./start-tor-browser.desktop --register-app"
become: false
become_user: "{{ lookup('env', 'USER') }}"
args:
creates: "{{ lookup('env', 'HOME') }}/.local/share/applications/start-tor-browser.desktop"
- name: Create symbolic link for Tor Browser
file:
src: "/opt/tor-browser/Browser/start-tor-browser"
dest: "/usr/local/bin/tor"
state: link
- name: Create temporary VeraCrypt directory for download
file:
path: /tmp/veracrypt
state: directory
mode: '0755'
- name: Download VeraCrypt .deb package
get_url:
url: "https://launchpad.net/veracrypt/trunk/1.26.14/+download/veracrypt-1.26.14-Ubuntu-22.04-amd64.deb"
dest: "/tmp/veracrypt/veracrypt.deb"
mode: '0644'
- name: Install VeraCrypt dependencies
apt:
name:
- dmsetup
- libfuse2
state: present
update_cache: yes
- name: Install VeraCrypt from .deb file
apt:
deb: "/tmp/veracrypt/veracrypt.deb"
state: present
- name: Download Docker installation script
get_url:
url: https://get.docker.com
dest: /tmp/get-docker.sh
mode: '0755'
- name: Install Docker
shell: sh /tmp/get-docker.sh
args:
creates: /usr/bin/docker
- name: Start and enable Docker services
systemd:
name: "{{ item }}"
state: started
enabled: yes
loop:
- docker.socket
- docker.service
- name: Add user to docker group
user:
name: "{{ lookup('env', 'USER') }}"
groups: docker
append: yes
- name: Display message
debug:
msg:
- "Installation and configuration completed successfully! =D"
- "Run 'newgrp docker' to apply the group changes."
- name: Install Docker Compose
get_url:
url: "https://github.com/docker/compose/releases/latest/download/docker-compose-{{ ansible_system }}-{{ ansible_architecture }}"
dest: /usr/local/bin/docker-compose
mode: '0755'
- name: Install Kind
get_url:
url: https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
dest: /usr/local/bin/kind
mode: '0755'
- name: Install kubectl
get_url:
url: "https://dl.k8s.io/release/{{ lookup('url', 'https://dl.k8s.io/release/stable.txt') }}/bin/linux/amd64/kubectl"
dest: /usr/local/bin/kubectl
mode: '0755'
- name: Add Flathub repository
shell: flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
args:
creates: /var/lib/flatpak/repo/flathub.flatpakrepo
- name: Install applications via flatpak
shell: flatpak install -y flathub {{ item }}
args:
creates: /var/lib/flatpak/app/{{ item }}
loop:
- com.bitwarden.desktop
- com.discordapp.Discord
- com.github.unrud.VideoDownloader
- com.obsproject.Studio
- org.kde.optiimage
- org.qbittorrent.qBittorrent
- org.telegram.desktop