bundles/nginx: add deployment of vhost configs

This commit is contained in:
Franzi 2020-06-01 10:52:52 +02:00
parent dc9e8dc679
commit c4330f866b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 54 additions and 0 deletions

View file

@ -21,3 +21,19 @@ svc_systemd = {
},
},
}
for domain, config in node.metadata.get('nginx', {}).get('vhosts', {}).items():
files['/etc/nginx/sites/{}'.format(domain)] = {
'source': 'site_template',
'content_type': 'mako',
'context': {
'domain': domain,
**config
},
'needs': {
'action:letsencrypt_update_certificates',
},
'triggers': {
'svc_systemd:nginx:restart',
},
}