bundles/nginx: use DEFAULTS for letsencrypt

This commit is contained in:
Franzi 2020-07-19 10:58:54 +02:00
parent ce0af62968
commit 31a1a88d13
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -31,13 +31,16 @@ def letsencrypt(metadata):
if not node.has_bundle('letsencrypt'):
return metadata, DONE
le = metadata.setdefault('letsencrypt', {})
domains = le.setdefault('domains', {})
domains = {}
for domain in metadata.get('nginx', {}).get('vhosts', {}).keys():
domains[domain] = set()
reload = le.setdefault('reload_after', set())
reload.add('nginx')
return metadata, RUN_ME_AGAIN
return {
'letsencrypt': {
'domains': domains,
'reload_after': {
'nginx',
},
},
}, DEFAULTS, RUN_ME_AGAIN