-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
76 lines (76 loc) · 2.53 KB
/
main.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
---
- hosts: pi
remote_user: pi
become: yes
tasks:
- name: General - Add SSH authorized key
authorized_key:
user: pi
key: https://github.com/fabienm.keys
- name: General - Update packages
apt:
update_cache: yes
upgrade: yes
- name: Chromium - Install chromium
apt:
name: chromium-browser
state: latest
- name: Chromium - install libwidevinecdm.so
copy:
src: lib/libwidevinecdm.so
dest: /usr/lib/chromium-browser/
mode: 0755
- name: Chromium - Run as kiosk on startup
lineinfile:
path: /home/pi/.config/lxsession/LXDE-pi/autostart
line: '@chromium-browser --user-agent="Mozilla/5.0 (X11\; CrOS armv7l 11895.95.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.125 Safari/537.36" --kiosk https://open.spotify.com/collection/albums'
- name: LCD - Clone driver
git:
repo: https://github.com/goodtft/LCD-show.git
dest: /tmp/LCD-show
force: yes
- name: LCD - Set driver installer executable
file:
path: /tmp/LCD-show/MPI3508-show
mode: 0755
# - name: LCD - Install driver
# command: /tmp/LCD-show/MPI3508-show
- name: Power Button - Install script
template:
src: templates/listen-for-shutdown.py.j2
dest: /usr/local/bin/listen-for-shutdown.py
mode: 0744
- name: Power Button - Install service
copy:
src: templates/listen-for-shutdown.sh.j2
dest: /etc/init.d/listen-for-shutdown.sh
mode: 0744
- name: Power Button - Enable service
service:
name: listen-for-shutdown.py
state: started
enabled: yes
- name: Splash Screen - disable_splash
lineinfile:
path: /boot/config.txt
line: 'disable_splash=1'
- name: Splash Screen - Set up cmdline
lineinfile:
path: /boot/cmdline.txt
regexp: '^dwc_otg\.lpm_enable'
line: 'dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo consoleblank=0 loglevel=1 quiet'
- name: Splash Screen - Install framebuffer image viewer
apt:
name: fbi
- name: Splash Screen - Install service
template:
src: templates/splashscreen.service.j2
dest: /etc/systemd/system/splashscreen.service
- name: Splash Screen - get image
get_url:
url: https://d.newsweek.com/en/full/1518010/pokemon-sword-shield-galar-forms-zigzagoon.jpg
dest: /usr/local/splash.jpg
- name: Splash Screen - Enable service
service:
name: splashscreen
enabled: yes