From 48cc8658925a72078197d00ca3bd916e2485e853 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 18 Oct 2020 18:55:00 +0200 Subject: [PATCH] bundles/nginx: make sure webroot directory exists --- bundles/nginx/items.py | 3 +++ nodes/htz/ex42-1048908.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bundles/nginx/items.py b/bundles/nginx/items.py index 659e5b7..20f89d4 100644 --- a/bundles/nginx/items.py +++ b/bundles/nginx/items.py @@ -57,5 +57,8 @@ for domain, config in node.metadata.get('nginx', {}).get('vhosts', {}).items(): }, } + if not 'webroot' in config: + directories['/var/www/{}'.format(domain)] = config.get('webroot_config', {}) + if node.metadata['nginx']['use_ssl_for_all_connections']: files['/etc/nginx/sites/{}'.format(domain)]['needs'].add('action:letsencrypt_update_certificates') diff --git a/nodes/htz/ex42-1048908.py b/nodes/htz/ex42-1048908.py index 59046b0..e9fa859 100644 --- a/nodes/htz/ex42-1048908.py +++ b/nodes/htz/ex42-1048908.py @@ -204,7 +204,12 @@ nodes['htz.ex42-1048908'] = { }, 'extras': True, }, - 'vliedel.random.franzi.business': {}, + 'vliedel.random.franzi.business': { + 'webroot_config': { + 'owner': 'vliedel', + 'group': 'vliedel', + }, + }, 'webmail.mx0.kunbox.net': { 'index': 'index.php', 'php': True,