29 lines
535 B
Python
29 lines
535 B
Python
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,
|
|
}
|