-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.yaml
More file actions
53 lines (46 loc) · 1.26 KB
/
main.yaml
File metadata and controls
53 lines (46 loc) · 1.26 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
# Copyright (c) 2025 Damien Boisvert (AlphaGameDeveloper)
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
---
- name: Install and configure a Raspberry Pi to act as a Thin Client
hosts: all
become: true
vars_files:
- config.yaml
vars:
packages:
- xserver-xorg
- x11-xserver-utils
- xinit
- openbox
- zenity
- virt-viewer
tasks:
- name: Update apt cache
apt:
update_cache: yes
cache_valid_time: 3600
- name: Install required packages
apt:
name: "{{ item }}"
state: present
loop: "{{ packages }}"
- name: Configure auto-login
import_tasks: tasks/autologin.yaml
- name: Create startup script
template:
src: thinclient.sh.j2
dest: /home/{{ ansible_user }}/thinclient.sh
mode: '0755' # perms: rwxr-xr-x
- name: Create autostart file
template:
src: autostart.j2
dest: /etc/xdg/openbox/autostart
- name: Add startup to .bash_profile
lineinfile:
line: "[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx --"
path: /home/{{ ansible_user }}/.bash_profile
insertafter: EOF
create: true
state: present