-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu.yaml
101 lines (91 loc) · 2.52 KB
/
ubuntu.yaml
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
- name: Ubuntu
become: yes
hosts: localhost
connection: local
tasks:
- ansible.builtin.package_facts: manager=apt
- ansible.builtin.set_fact: is_desktop="{{ 'ubuntu-desktop' in ansible_facts.packages }}" cacheable=yes
- name: Keys
ansible.builtin.apt_key:
url: "{{ item.url }}"
keyring: "{{ item.keyring }}"
state: present
with_items:
- name: regolith
keyring: /usr/share/keyrings/regolith-archive-keyring.gpg
url: https://regolith-desktop.org/regolith.key
when: is_desktop
- name: Remove old repository
ansible.builtin.apt_repository:
repo: ppa:regolith-linux/release
state: absent
when: is_desktop
- name: Repositories
ansible.builtin.apt_repository:
repo: "{{ item }}"
update_cache: no
register: repositories
with_items:
- deb [arch=amd64 signed-by=/usr/share/keyrings/regolith-archive-keyring.gpg] https://regolith-desktop.org/release-ubuntu-focal-amd64 focal main
- ppa:system76-dev/stable
when: is_desktop
- name: Packages
ansible.builtin.apt:
install_recommends: no
update_cache: "{{ repositories.changed }}"
name:
- fish
- graphviz
- gnupg
- gpg-agent
- screen
- shellcheck
- vim-gtk # for +clipboard support
- xclip
- name: Desktop packages
ansible.builtin.apt:
install_recommends: no
update_cache: "{{ repositories.changed }}"
name:
- caffeine
- chromium-browser
- gnome-tweaks
# regolith
- regolith-desktop
- i3xrocks-app-launcher
- i3xrocks-battery
- i3xrocks-info
- i3xrocks-memory
- i3xrocks-rofication
- i3xrocks-time
- regolith-compositor-picom-glx
# ... end regolith
- system76-power # battery life
- tlp # battery life
- variety
when: is_desktop
- name: Shell
ansible.builtin.user:
name: robin
shell: /usr/bin/fish
state: present
- name: Xresources
ansible.builtin.file:
dest: /home/robin/.config/regolith2
state: directory
owner: robin
group: robin
when: is_desktop
- name: Regolith Xresources
ansible.builtin.copy:
src: files/Xresources
dest: /home/robin/.config/regolith2/Xresources
owner: robin
group: robin
when: is_desktop
- name: Enable GPG agent forwarding
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: ^StreamLocalBindUnlink
line: StreamLocalBindUnlink yes
when: not is_desktop