some grafana bundle fixes

This commit is contained in:
cronekorkn 2023-06-26 19:37:30 +02:00
parent 5e66318c38
commit 0cf83d0744
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw

View file

@ -18,7 +18,7 @@ admin_password = node.metadata.get('grafana/config/security/admin_password')
port = node.metadata.get('grafana/config/server/http_port') port = node.metadata.get('grafana/config/server/http_port')
actions['reset_grafana_admin_password'] = { actions['reset_grafana_admin_password'] = {
'command': f"sleep 5 && grafana-cli admin reset-admin-password {quote(admin_password)}", 'command': f"sleep 5 && grafana-cli admin reset-admin-password {quote(admin_password)}",
'unless': f"curl http://admin:{quote(admin_password)}@localhost:{port}/api/org", 'unless': f"curl http://admin:{quote(admin_password)}@localhost:{port}/api/org --fail-with-body",
'needs': [ 'needs': [
'svc_systemd:grafana-server', 'svc_systemd:grafana-server',
], ],
@ -35,6 +35,8 @@ directories = {
}, },
'/var/lib/grafana': {}, '/var/lib/grafana': {},
'/var/lib/grafana/dashboards': { '/var/lib/grafana/dashboards': {
'owner': 'grafana',
'group': 'grafana',
'purge': True, 'purge': True,
'triggers': [ 'triggers': [
'svc_systemd:grafana-server:restart', 'svc_systemd:grafana-server:restart',