From e7023d087b270a7d8f015cf81b0b9329529ed7a9 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 23 Jul 2021 19:53:49 +0200 Subject: [PATCH] bundles/matrix-dimension: add zfs --- bundles/matrix-dimension/metadata.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bundles/matrix-dimension/metadata.py b/bundles/matrix-dimension/metadata.py index 88c0146..c3f037d 100644 --- a/bundles/matrix-dimension/metadata.py +++ b/bundles/matrix-dimension/metadata.py @@ -42,6 +42,7 @@ defaults = { }, } + @metadata_reactor.provides( 'nginx/vhosts/matrix-dimension', ) @@ -64,6 +65,31 @@ def nginx_config(metadata): } +@metadata_reactor.provides( + 'zfs/datasets', +) +def zfs(metadata): + return { + 'zfs': { + 'datasets': { + 'tank/matrix-dimension': {}, + 'tank/matrix-dimension/install': { + 'mountpoint': metadata.get('matrix-dimension/install_dir'), + 'needed_by': { + 'directory:{}'.format(metadata.get('matrix-dimension/install_dir')), + }, + }, + 'tank/matrix-dimension/var': { + 'mountpoint': metadata.get('matrix-dimension/data_dir'), + 'needed_by': { + 'directory:{}'.format(metadata.get('matrix-dimension/data_dir')), + }, + }, + }, + }, + } + + # XXX enable this once there are releases for matrix-dimension #@metadata_reactor.provides( # 'icinga2_api/matrix-dimension/services',