bundles/nginx: use DEFAULTS for letsencrypt
This commit is contained in:
parent
ce0af62968
commit
31a1a88d13
1 changed files with 9 additions and 6 deletions
|
@ -31,13 +31,16 @@ def letsencrypt(metadata):
|
||||||
if not node.has_bundle('letsencrypt'):
|
if not node.has_bundle('letsencrypt'):
|
||||||
return metadata, DONE
|
return metadata, DONE
|
||||||
|
|
||||||
le = metadata.setdefault('letsencrypt', {})
|
domains = {}
|
||||||
domains = le.setdefault('domains', {})
|
|
||||||
|
|
||||||
for domain in metadata.get('nginx', {}).get('vhosts', {}).keys():
|
for domain in metadata.get('nginx', {}).get('vhosts', {}).keys():
|
||||||
domains[domain] = set()
|
domains[domain] = set()
|
||||||
|
|
||||||
reload = le.setdefault('reload_after', set())
|
return {
|
||||||
reload.add('nginx')
|
'letsencrypt': {
|
||||||
|
'domains': domains,
|
||||||
return metadata, RUN_ME_AGAIN
|
'reload_after': {
|
||||||
|
'nginx',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, DEFAULTS, RUN_ME_AGAIN
|
||||||
|
|
Loading…
Reference in a new issue