-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-base.yaml
97 lines (81 loc) · 2.62 KB
/
playbook-base.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
#
# This file is part of the m2-kiosk-ansible distribution (https://github.com/M2tec/m2_kiosk_ansible).
# Copyright (c) 2023 Maarten Menheere.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
- name: Install packages
hosts: m2paypad
become: yes
vars:
dest_path: /tmp/latest/
tasks:
- name: Ping my hosts
ansible.builtin.ping:
- name: Enable hyperpixel overlay
shell: "sudo grep -qFx 'dtoverlay=vc4-kms-dpi-hyperpixel4' /boot/config.txt || echo 'dtoverlay=vc4-kms-dpi-hyperpixel4' | sudo tee -a /boot/config.txt"
- name: Make sure destination dir exists
file:
path: "{{ dest_path | dirname }}"
state: directory
- name: Add locale bash variables for en_GB
shell: 'echo "LANG=en_GB.UTF-8 LC_CTYPE=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_ALL=en_GB.UTF-8" | tr " " "\n" | sudo tee /etc/default/locale'
- name: Enable US locale
shell: "sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen"
- name: Enable NL locale
shell: "sed -i '/nl_NL.UTF-8/s/^# //g' /etc/locale.gen"
- name: Generate locales
shell: 'locale-gen'
- name: Update apt-get repo and cache
apt:
update_cache=yes
force_apt_get=yes
cache_valid_time=3600
- name: Upgrade all apt packages
apt:
upgrade=dist
force_apt_get=yes
- name: Install desktop
apt:
install_recommends: false
pkg:
- xserver-xorg
- xinit
- raspberrypi-ui-mods
- lxsession
- gnome-themes-extra
- lxde-core
- lxappearance
- xfce4
- xfce4-terminal
- pixflat-icons
- network-manager-gnome
- pipanel
- name: Install packages apt
apt:
pkg:
- python3-pip
- gunicorn
- nginx
- onboard
- gir1.2-soup-2.4
- at-spi2-core
- dconf-cli
- dconf-editor
- unattended-upgrades
- python3-flask
- python3-flask-cors
- name: Install python qrcode library
shell: "pip install qrcode"
- name: Set boot to desktop
shell: "raspi-config nonint do_boot_behaviour B4"