1
0
Fork 0

Compare commits

..

No commits in common. "aebf8d7676176ef638b727f21431eecb333f071d" and "cec86bfc8b635b2265bf87e1a1f616dd1cd60934" have entirely different histories.

5 changed files with 12 additions and 55 deletions

2
hosts
View File

@ -1,2 +1,2 @@
[raspberrypi_kiosk] [raspberrypi-kiosk]
raspberrypi.local ansible_user=pi ansible_password=raspberry ansible_become_method=sudo ansible_become_user=root raspberrypi.local ansible_user=pi ansible_password=raspberry ansible_become_method=sudo ansible_become_user=root

View File

@ -1,6 +1 @@
kiosk_url: https://floatingqrcode.com/ kiosk_url: https://floatingqrcode.com/
lockdown: false
proxy:
http_proxy: ""
https_proxy: ""
no_proxy: ""

View File

@ -1,15 +1,3 @@
- name: Perform system upgrades
apt:
update_cache: true
upgrade: dist
environment:
http_proxy: "{{ proxy.http_proxy }}"
HTTP_PROXY: "{{ proxy.http_proxy }}"
https_proxy: "{{ proxy.https_proxy }}"
HTTPS_PROXY: "{{ proxy.https_proxy }}"
no_proxy: "{{ proxy.no_proxy }}"
NO_PROXY: "{{ proxy.no_proxy }}"
- name: Install Cage window manager and Midori browser - name: Install Cage window manager and Midori browser
apt: apt:
update_cache: yes update_cache: yes
@ -18,28 +6,8 @@
- xwayland - xwayland
- gtk3-nocsd - gtk3-nocsd
- midori - midori
- chromium-browser
environment:
http_proxy: "{{ proxy.http_proxy }}"
HTTP_PROXY: "{{ proxy.http_proxy }}"
https_proxy: "{{ proxy.https_proxy }}"
HTTPS_PROXY: "{{ proxy.https_proxy }}"
no_proxy: "{{ proxy.no_proxy }}"
NO_PROXY: "{{ proxy.no_proxy }}"
- name: Configure proxy - name: Configure autologin
blockinfile:
path: /etc/environment
block: |
http_proxy="{{ proxy.http_proxy }}"
HTTP_PROXY="{{ proxy.http_proxy }}"
https_proxy="{{ proxy.https_proxy }}"
HTTPS_PROXY="{{ proxy.https_proxy }}"
no_proxy="{{ proxy.no_proxy }}"
NO_PROXY="{{ proxy.no_proxy }}"
notify: Reboot
- name: Enable autologin
command: raspi-config nonint do_boot_behaviour B2 command: raspi-config nonint do_boot_behaviour B2
- name: Install kiosk script - name: Install kiosk script
@ -47,16 +15,3 @@
src: kiosk.sh.j2 src: kiosk.sh.j2
dest: /etc/profile.d/kiosk.sh dest: /etc/profile.d/kiosk.sh
notify: Reboot notify: Reboot
# This help prevent sd card corruption over time
- name: Enable overlayfs
command: raspi-config nonint do_overlayfs 0
when: lockdown
notify: Reboot
- name: Turn off ssh server
service:
name: ssh
enabled: false
when: lockdown
notify: Reboot

View File

@ -3,7 +3,6 @@
if [ "$(tty)" = "/dev/tty1" ]; then if [ "$(tty)" = "/dev/tty1" ]; then
while true; do while true; do
GTK_CSD=0 cage -d -s -- midori -e fullscreen -a {{ kiosk_url }} GTK_CSD=0 cage -d -s -- midori -e fullscreen -a {{ kiosk_url }}
#cage -d -s -- chromium-browser --noerrdialogs --disable-infobars --kiosk {{ kiosk_url }}
sleep 1 sleep 1
done done
fi fi

View File

@ -1,4 +1,12 @@
- hosts: all
become: true
tasks:
- name: Perform system update
apt:
update_cache: true
upgrade: dist
- hosts: all - hosts: all
become: true become: true
roles: roles:
- raspberrypi-kiosk - raspberrypi-kiosk