-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaybook.yml
More file actions
166 lines (159 loc) · 4.36 KB
/
playbook.yml
File metadata and controls
166 lines (159 loc) · 4.36 KB
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
- name: Setup
hosts: localhost
connection: local
vars:
user: galep
directories:
- perso
- projects
tasks:
- name: Create directories
ansible.builtin.file:
path: /home/{{ user }}/{{ item }}
state: directory
loop: "{{ directories }}"
- name: Apt packages
hosts: localhost
connection: local
become: true
vars:
packages:
- git
- emacs
- python3
- python3-pip
- exa
- bat
- jq
- gdb
tasks:
- name: Install apt packages
ansible.builtin.apt:
name: "{{ item }}"
state: present
loop: "{{ packages }}"
tags:
- deb-utils
- name: Rust
hosts: localhost
connection: local
become: true
vars:
packages:
- rm-improved
- just
tasks:
- name: Download Installer
ansible.builtin.get_url:
url: https://sh.rustup.rs
dest: /tmp/sh.rustup.rs
mode: '0755'
force: 'yes'
- name: Install rust/cargo
ansible.builtin.script:
cmd: /tmp/sh.rustup.rs -y
# - name: Install rust packages
# community.general.cargomode: '0755':
# name: "{{ item }}"
# state: latest
# loop: "{{ packages }}"
tags:
- rust
- name: Golang
hosts: localhost
connection: local
vars:
package:
- glow
tasks:
- name: Remove previous Golang installation
ansible.builtin.file:
path: /usr/local/go
state: absent
- name: Download Installer
ansible.builtin.get_url:
url: https://go.dev/dl/go1.19.4.linux-amd64.tar.gz
dest: /tmp/go1.19.4.linux-amd64.tar.gz
mode: '0544'
force: 'yes'
- name: Install Go
ansible.builtin.unarchive:
src: /tmp/go1.19.4.linux-amd64.tar.gz
creates: /usr/local/bin/go/
dest: /usr/local/bin/go
- name: Install go packages
command: go get {{ item }}
loop: "{{ packages }}"
tags:
- go
- name: Kitty
hosts: localhost
connection: local
become: true
vars:
user: galep
tasks:
- name: Download Installer
ansible.builtin.get_url:
url: https://sw.kovidgoyal.net/kitty/installer.sh
dest: /tmp/kitty-installer.sh
mode: '0544'
force: 'yes'
- name: Install kitty
ansible.builtin.script:
cmd: /tmp/kitty-installer.sh
- name: Create a symbolic link to add kitty to PATH
ansible.builtin.file:
src: /home/{{ user }}/.local/kitty.app/bin/kitty
dest: /home/{{ user }}/.local/bin/kitty
state: link
mode: '0744'
force: true
- name: Place the kitty.desktop file somewhere it can be found by the OS
ansible.builtin.copy:
src: ~/.local/kitty.app/share/applications/kitty.desktop
dest: ~/.local/share/applications/
mode: '0755'
- name: Update the paths to the icon in the kitty.desktop file(s)
ansible.builtin.lineinfile:
path: /home/{{ user }}/.local/share/applications/kitty*.desktop
search_string: 'Icon=kitty'
line: 'Icon=/home/{{ user }}/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png'
- name: Update the paths to the binary in the kitty.desktop file(s)
ansible.builtin.lineinfile:
path: /home/{{ user }}/.local/share/applications/kitty*.desktop
search_string: 'Exec=kitty'
line: 'Exec=/home/{{ user }}/.local/kitty.app/bin/kitty'
tags:
- kitty
- name: Lazygit
hosts: localhost
connection: local
become: true
gather_facts: false
tasks:
- name: Get lazygit version
ansible.builtin.script:
cmd: curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v*([^"]+)".*/\1/'
register: lazygit_version
- name: Download archive
ansible.builtin.get_url:
url: https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_{{ lazygit_version.stdout_lines[0] }}_Linux_x86_64.tar.gz
dest: /tmp/lazygit.tar.gz
mode: '0544'
- name: Install lazygit
ansible.builtin.unarchive:
src: /tmp/lazygit.tar.gz
dest: /usr/local/bin
tags:
- lazygit
# https://github.com/pwndbg/pwndbg
- name: pwndbg
hosts: localhost
connection: local
become: true
tasks:
- name: Clone pwndbg repository
ansible.builtin.git:
repo: https://github.com/pwndbg/pwndbg
dest: /home/{{ user }}/projects