items/zfs_dataset: add automatic dependency for all files, directories and git_deploy of a dataset

This commit is contained in:
Franzi 2021-07-17 09:10:56 +02:00
parent b3e322ae08
commit 1086ed28c3
Signed by: kunsi
GPG key ID: 12E3D2136B818350
6 changed files with 9 additions and 28 deletions

View file

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