mirror of
https://github.com/roles-ansible/role-grafana-kiosk.git
synced 2024-08-16 10:09:49 +02:00
create systemd file
This commit is contained in:
parent
85783bfe45
commit
df48345442
4 changed files with 27 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
# default variables
|
||||
grafana_kiosk:
|
||||
user: pi
|
||||
git_release: 'v1.0.2'
|
||||
git_url: 'https://github.com/grafana/grafana-kiosk'
|
||||
install_requirements: true
|
||||
|
|
|
@ -12,3 +12,12 @@
|
|||
dest: /etc/grafana-kiosk/config.yml
|
||||
mode: 0644
|
||||
backup: true
|
||||
|
||||
- name: deploy systemd file
|
||||
become: true
|
||||
template:
|
||||
src: templates/grafana-kiosk.service
|
||||
dest: /etc/systemd/system/grafana-kiosk.service
|
||||
mode: 0664
|
||||
owner: root
|
||||
group: root
|
||||
|
|
15
templates/grafana-kiosk.service
Normal file
15
templates/grafana-kiosk.service
Normal file
|
@ -0,0 +1,15 @@
|
|||
[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
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User={{ grafana_kiosk.user }}
|
||||
Environment="DISPLAY=:0"
|
||||
Environment="XAUTHORITY=/home/{{ grafana_kiosk.user }}/.Xauthority"
|
||||
ExecStart=/usr/bin/grafana-kiosk -c /etc/grafana-kiosk/config.yml
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
_grafana_kiosk:
|
||||
user: pi
|
||||
git_release: 'v1.0.2'
|
||||
git_url: 'https://github.com/grafana/grafana-kiosk'
|
||||
install_requirements: true
|
||||
|
@ -26,5 +27,5 @@ _dl_matrix:
|
|||
'armv6l': "grafana-kiosk.linux.armv6"
|
||||
'armv5l': "grafana-kiosk.linux.armv5"
|
||||
|
||||
playbook_version_number: 4 # should be an integer
|
||||
playbook_version_number: 5 # should be an integer
|
||||
playbook_version_path: 'role-grafana-kiosk_roles-ansible_github.com.version' # unique string
|
||||
|
|
Loading…
Reference in a new issue