diff --git a/bundles/grafana/items.py b/bundles/grafana/items.py index e0c8549..f9378ae 100644 --- a/bundles/grafana/items.py +++ b/bundles/grafana/items.py @@ -33,7 +33,10 @@ directories = { '/etc/grafana/provisioning/dashboards': { 'purge': True, }, - '/var/lib/grafana': {}, + '/var/lib/grafana': { + 'owner': 'grafana', + 'group': 'grafana', + }, '/var/lib/grafana/dashboards': { 'owner': 'grafana', 'group': 'grafana', @@ -47,6 +50,8 @@ directories = { files = { '/etc/grafana/grafana.ini': { 'content': repo.libs.ini.dumps(node.metadata.get('grafana/config')), + 'owner': 'grafana', + 'group': 'grafana', 'triggers': [ 'svc_systemd:grafana-server:restart', ], @@ -56,6 +61,8 @@ files = { 'apiVersion': 1, 'datasources': list(node.metadata.get('grafana/datasources').values()), }), + 'owner': 'grafana', + 'group': 'grafana', 'triggers': [ 'svc_systemd:grafana-server:restart', ], @@ -72,6 +79,8 @@ files = { }, }], }), + 'owner': 'grafana', + 'group': 'grafana', 'triggers': [ 'svc_systemd:grafana-server:restart', ], @@ -160,6 +169,8 @@ for dashboard_id, monitored_node in enumerate(monitored_nodes, start=1): files[f'/var/lib/grafana/dashboards/{monitored_node.name}.json'] = { 'content': json.dumps(dashboard, indent=4), + 'owner': 'grafana', + 'group': 'grafana', 'triggers': [ 'svc_systemd:grafana-server:restart', ] diff --git a/bundles/influxdb2/items.py b/bundles/influxdb2/items.py index f485f6f..fcf2e09 100644 --- a/bundles/influxdb2/items.py +++ b/bundles/influxdb2/items.py @@ -4,7 +4,7 @@ from shlex import quote directories['/var/lib/influxdb'] = { 'owner': 'influxdb', 'group': 'influxdb', - 'mode': '0755', + 'mode': '0750', 'needs': [ 'zfs_dataset:tank/influxdb', ],