bundles/postfixadmin: move vhost generation to reactor

This commit is contained in:
Franzi 2023-09-01 05:54:23 +02:00
parent b01dcb0ff9
commit a838f6c5bd
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 21 additions and 6 deletions

View file

@ -60,3 +60,23 @@ def icinga_check_for_new_release(metadata):
},
},
}
@metadata_reactor.provides(
'nginx/vhosts/postfixadmin',
)
def nginx(metadata):
if not node.has_bundle('nginx'):
raise DoNotRunAgain
return {
'nginx': {
'vhosts': {
'postfixadmin': {
'domain': metadata.get('postfixadmin/domain'),
'webroot': '/opt/postfixadmin/public/',
'php': True,
},
},
},
}