bundles/postfix: introduce

This commit is contained in:
Franzi 2020-11-07 22:31:18 +01:00
parent 88afba9ce9
commit 5550d2cc56
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 208 additions and 0 deletions

View file

@ -0,0 +1,29 @@
defaults = {
'apt': {
'packages': {
'postfix': {},
},
},
}
@metadata_reactor
def letsencrypt(metadata):
if not node.has_bundle('letsencrypt'):
raise DoNotRunAgain
result = {
'reload_after': {
'postfix',
},
}
myhostname = metadata.get('postfix/myhostname', None)
if myhostname and myhostname != metadata.get('hostname'):
result['domains'] = {
myhostname: {},
}
return {
'letsencrypt': result,
}