bundles/nginx: add deployment of vhost configs
This commit is contained in:
parent
dc9e8dc679
commit
c4330f866b
3 changed files with 54 additions and 0 deletions
|
@ -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',
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue