From 676b8408f02377a6dd385402d1cb336a65c7cd62 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Thu, 4 Jan 2024 01:25:38 +0100 Subject: [PATCH] Setup a Kiosk on hobbes to show Grafana screenshots --- host-hobbes.yml | 29 ++++++++++++++++++++++++----- host_vars/hobbes.n39.eu/vars.yml | 3 +++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/host-hobbes.yml b/host-hobbes.yml index c5b9895..af2ec88 100644 --- a/host-hobbes.yml +++ b/host-hobbes.yml @@ -8,7 +8,6 @@ roles: - tasks: - name: Install packages needed for the system # This is a list of all packages, @@ -16,10 +15,9 @@ ansible.builtin.apt: state: present name: - # This is needed for the user-executed tasks - - acl - # Regular packages - - rng-tools + - mosquitto-clients + - fbi + - name: Remove the screensavers ansible.builtin.apt: @@ -54,5 +52,26 @@ groups: audio,plugdev,input,netdev append: yes + - name: Install Kiosk script + ansible.builtin.template: + src: templates/hobbes/kiosk.sh.j2 + dest: /usr/local/bin/kiosk.sh + owner: root + group: root + mode: '0755' + + - name: Add systemd service + ansible.builtin.copy: + src: files/hobbes/grafana-kiosk.service + dest: /etc/systemd/system/grafana-kiosk.service + owner: root + group: root + mode: '0644' + + - name: Enable and start kiosk service + ansible.builtin.service: + name: grafana-kiosk.service + enabled: true + state: started handlers: diff --git a/host_vars/hobbes.n39.eu/vars.yml b/host_vars/hobbes.n39.eu/vars.yml index e576735..b0b622b 100644 --- a/host_vars/hobbes.n39.eu/vars.yml +++ b/host_vars/hobbes.n39.eu/vars.yml @@ -2,3 +2,6 @@ server_admin: "admin+hobbes@netz39.de" mac: "b8:27:eb:f9:43:43" kiosk_user: pi +kiosk_mqtt_host: "mqtt.n39.eu" +kiosk_mqtt_topic: "Netz39/Things/HackingDashboard/Screenshot" +docker_data_root: "/srv/docker"