diff --git a/templates/grafana-kiosk.service b/templates/grafana-kiosk.service index 6d25da5..8d79c5f 100644 --- a/templates/grafana-kiosk.service +++ b/templates/grafana-kiosk.service @@ -1,18 +1,21 @@ [Unit] Description=Grafana Kiosk -Documentation=https://github.com/grafana/grafana-kiosk.git -Documentation=https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv Documentation=https://github.com/DO1JLR/role-grafana-kiosk.git +Documentation=https://github.com/grafana/grafana-kiosk.git After=network.target [Service] User={{ grafana_kiosk.user }} +Restart = always +RestartSec=5s +Type=simple Environment="{{ grafana_kiosk.display }}" -{% if not grafana_kiosk.general.autofit | bool -%} -Enviroment="KIOSK_AUTOFIT={{ grafana_kiosk.general.autofit | ternary("true", "false") }}" -{%- endif %} Environment="XAUTHORITY=/home/{{ grafana_kiosk.user }}/.Xauthority" -ExecStart=/usr/bin/grafana-kiosk -c /etc/grafana-kiosk/config.yml +ExecStart= + {%- if not grafana_kiosk.general.autofit | bool -%} + KIOSK_AUTOFIT={{ grafana_kiosk.general.autofit | ternary("true", "false") }}{{ ' ' }} + {%- endif -%} +/usr/bin/grafana-kiosk -c /etc/grafana-kiosk/config.yml [Install] WantedBy=graphical.target diff --git a/vars/main.yml b/vars/main.yml index 5e06865..55f7716 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -32,5 +32,5 @@ _dl_matrix: 'armv6l': "grafana-kiosk.linux.armv6" 'armv5l': "grafana-kiosk.linux.armv5" -playbook_version_number: 12 # should be an integer +playbook_version_number: 13 # should be an integer playbook_version_path: 'role-grafana-kiosk_roles-ansible_github.com.version' # unique string