From 07994de66cd85de94f1dbf32436df51c63602c78 Mon Sep 17 00:00:00 2001 From: Sophie Schiller Date: Sun, 4 Jul 2021 21:11:23 +0200 Subject: [PATCH] bw/matrix-dimension get all the things --- bundles/matrix-dimension/items.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bundles/matrix-dimension/items.py b/bundles/matrix-dimension/items.py index 8af625b..5fbb7d6 100644 --- a/bundles/matrix-dimension/items.py +++ b/bundles/matrix-dimension/items.py @@ -10,20 +10,20 @@ directories = { git_deploy = { node.metadata['matrix-dimension']['install_dir']: { - 'rev': node.metadata.get('matrix-dimension', {}).get('version', 'master'), # doesn't have releases yet + 'rev': node.metadata.get('matrix-dimension/version', 'master'), # doesn't have releases yet 'repo': 'https://github.com/turt2live/matrix-dimension.git', 'triggers': { 'action:matrix_dimension_build', }, 'needs': { - 'directory:{}'.format(node.metadata['matrix-dimension']['install_dir']), - 'directory:{}'.format(node.metadata['matrix-dimension']['data_dir']), + 'directory:{}'.format(node.metadatai.get('matrix-dimension/install_dir'), + 'directory:{}'.format(node.metadata.get('matrix-dimension/data_dir'), }, }, } files = { - '{}/config/production.yaml'.format(node.metadata['matrix-dimension']['install_dir']): { + '{}/config/production.yaml'.format(node.metadata.get('matrix-dimension/install_dir'): { 'owner': 'matrix-dimension', 'group': 'matrix-dimension', 'content_type': 'mako', @@ -32,7 +32,7 @@ files = { }, 'needs': { 'action:element-web_yarn', - 'directory:{}'.format(node.metadata['matrix-dimension']['install_dir']), + 'directory:{}'.format(node.metadata.get('matrix-dimension/install_dir'), }, 'triggers': { 'svc_systemd:matrix-dimension:restart', @@ -52,7 +52,7 @@ files = { actions = { 'matrix_dimension_build': { - 'command': 'cd ' + node.metadata['matrix-dimension']['install_dir'] + ' && sudo -u matrix-dimension npm install && sudo -u matrix-dimension npm run build', + 'command': 'cd ' + node.metadata.get('matrix-dimension/install_dir') + ' && sudo -u matrix-dimension npm install && sudo -u matrix-dimension npm run build', 'needs': { 'pkg_apt:nodejs', }, @@ -67,7 +67,7 @@ svc_systemd = { 'matrix-dimension': { 'needs': { 'action:matrix_dimension_build', - 'file:{}/config/production.yaml'.format(node.metadata['matrix-dimension']['install_dir']), + 'file:{}/config/production.yaml'.format(node.metadata.get('matrix-dimension/install_dir'), 'postgres_db:matrix-dimension', 'postgres_role:matrix-dimension', },