bundles/grafana: fix permissions for some files and directories
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-07-04 20:06:35 +02:00
parent cbc0a1a927
commit 9021c6f853
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -11,28 +11,25 @@ for row in Path(join(repo.path, 'bundles', 'grafana', 'dashboard-rows')).rglob("
exec(f.read())
directories = {
# Don't ask me why these permissions are that weird. It's what the
# debian package sets them to after upgrades.
'/etc/grafana/provisioning/dashboards': {
'owner': 'grafana',
'group': 'grafana',
'purge': True,
},
'/etc/grafana/provisioning/datasources': {
'owner': 'grafana',
'group': 'grafana',
'purge': True,
},
'/etc/grafana/provisioning/notifiers': {
'owner': 'grafana',
'group': 'grafana',
'purge': True,
},
'/etc/grafana/provisioning/plugins': {
'owner': 'grafana',
'group': 'grafana',
'purge': True,
},
'/var/lib/grafana/dashboards': {
'owner': 'grafana',
'group': 'grafana',
'purge': True,
'triggers': {
@ -129,6 +126,8 @@ for rnode in repo.nodes:
dashboard['tags'].add('zfs')
files[f'/var/lib/grafana/dashboards/{rnode.name}.json'] = {
'owner': 'grafana',
'group': 'grafana',
# use metadata_to_json, because this supports sets
'content': metadata_to_json(dashboard),
'triggers': {