bundles/postfix: introduce
This commit is contained in:
parent
88afba9ce9
commit
5550d2cc56
4 changed files with 208 additions and 0 deletions
29
bundles/postfix/metadata.py
Normal file
29
bundles/postfix/metadata.py
Normal 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,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue