bundles/nginx: create webroot directories after bundle:zfs is done

This commit is contained in:
Franzi 2020-11-12 22:59:46 +01:00
parent 2274e7aa37
commit e5c12f0628
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -78,7 +78,14 @@ for vhost, config in node.metadata.get('nginx', {}).get('vhosts', {}).items():
} }
if not 'webroot' in config: if not 'webroot' in config:
directories['/var/www/{}'.format(vhost)] = config.get('webroot_config', {}) directories['/var/www/{}'.format(vhost)] = {}
if node.has_bundle('zfs'):
directories['/var/www/{}'.format(vhost)]['needs'] = {
'bundle:zfs',
}
directories['/var/www/{}'.format(vhost)].update(config.get('webroot_config', {}))
if node.metadata['nginx']['use_ssl_for_all_connections']: if node.metadata['nginx']['use_ssl_for_all_connections']:
files['/etc/nginx/sites/{}'.format(vhost)]['needs'].add('action:letsencrypt_update_certificates') files['/etc/nginx/sites/{}'.format(vhost)]['needs'].add('action:letsencrypt_update_certificates')