-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsdr.yml
More file actions
190 lines (165 loc) · 5.42 KB
/
sdr.yml
File metadata and controls
190 lines (165 loc) · 5.42 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
---
- name: Configure my SDR headless desktop
hosts:
- sdr
vars:
use_handlers: 'true'
use_reboot: 'false'
use_logout: 'false'
tasks:
# - name: Install Swapfile
# include_role:
# name: swapfilesetup
# vars:
# swapsizegb: 8
# swappath: /swapfile
- name: Set ssh keys for root account
authorized_key:
user: root
key: "{{rootsshkeys|join('\n')}}"
exclusive: true
- name: Create useraccount
include_role:
name: useraccount
- name: Shell Tools
block:
- name: Install shell tools
package:
name:
- vim
- htop
- curl
- mc
- screen
- git
- ncdu
- wget
- less
- usbutils
- nmap
- wireshark-cli
- mtr
- parted
- dosfstools
- btrfs-progs
- exfatprogs
- ntfs-3g
- xfsprogs
- gpart
- mtools
- unp
- unarj
- unrar
- unzip
- bzip2
- p7zip
- unace
- cpio
- sharutils
- cabextract
- rpmextract
- name: Create vimrc
copy:
dest: /root/.vimrc
owner: root
group: root
mode: u=rw,go=-
content: |
set background=dark
syntax on
set mouse=
- name: Install X11
include_role:
name: xorgsetup
vars:
xorg_video_driver: "{{ 'vmware' if ansible_product_name == 'VirtualBox' else 'intel' }}"
xorg_handle_lightdm_restart: "{{use_handlers|bool}}"
- name: Install XFCE
include_role:
name: xfcesetup
- name: Install Pulseaudio
include_role:
name: pulseaudiosetup
- name: Install NetworkManager
include_role:
name: networkmanagersetup
vars:
networkmanager_gui: true
- name: Desktop Tools
block:
- name: Install Desktop Tools
package:
name:
- firefox
- vlc
- wireshark-qt
- gparted
- remmina
- libvncserver
- spice-gtk
- freerdp
- name: Check if xfce is running
include_role:
name: xfcestatus
- name: Configure Desktop
block:
- name: Create wallpapers folder
file:
path: "{{useraccount_home}}/Pictures/Wallpapers"
owner: "{{useraccount_uid}}"
group: "{{useraccount_gid}}"
mode: u=rwx,go=rx
state: directory
- name: Copy wallpaper
copy:
src: "files/wallpapers/{{wallpaper}}"
dest: "{{useraccount_home}}/Pictures/Wallpapers/{{wallpaper}}"
owner: "{{useraccount_uid}}"
group: "{{useraccount_gid}}"
mode: u=rwx,go=rx
- name: Apply XFCE settings
include_role:
name: xfceconfig
when: xfcestatus_isrunning
vars:
xfceparameters:
# DISPLAY=:0.0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus xfconf-query -c xfce4-desktop -m
- { c: keyboard-layout, p: /Default/XkbDisable, t: bool, v: 'false' }
- { c: keyboard-layout, p: /Default/XkbLayout, t: string, v: "{{xfcekeymap}}" }
- { c: keyboard-layout, p: /Default/XkbVariant, t: string, v: "{{xfcekeymapvariant}}" }
- { c: xfce4-session, p: /shutdown/LockScreen, t: bool, v: 'true' }
- { c: xfce4-power-manager, p: /xfce4-power-manager/lock-screen-suspend-hibernate, t: bool, v: 'true' }
- { c: xfce4-session, p: /general/SaveOnExit, t: bool, v: 'false' }
- { c: xfce4-desktop, p: /backdrop/single-workspace-mode, t: bool, v: 'true' }
- { c: xfce4-panel, p: /panels/panel-1/autohide-behavior, t: uint, v: "1" }
- { c: xfce4-panel, p: /panels/panel-2/autohide-behavior, t: uint, v: "1" }
xfcemonitorsettings:
- { c: xfce4-desktop, p: /backdrop/screenSCREENNUM/monitorMONITORNAME/workspace0/last-image, t: string, v: "{{useraccount_home}}/Pictures/Wallpapers/{{wallpaper}}" }
- { c: xfce4-desktop, p: /backdrop/screenSCREENNUM/monitorMONITORNAME/workspace0/image-style, t: int, v: "3" }
- name: Finish Setup
block:
- name: Disable automatic ansible apply service
systemd_service:
name: perrys-ansible-apply
enabled: false
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
- name: Delete XFCE4 sessions
file:
path: /home/{{useraccount_name}}/.cache/sessions
state: absent
- name: Logout
shell:
executable: /usr/bin/bash
cmd: 'xfce4-session-logout -l -f'
become: true
become_user: "{{useraccount_name}}"
environment:
DISPLAY: :0.0
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/{{useraccount_uid}}/bus"
when: xfcestatus_isrunning and (use_logout | bool)
- name: Reboot
shell:
executable: /usr/bin/bash
cmd: reboot
when: use_reboot | bool