33 lines
768 B
Python
33 lines
768 B
Python
if node.has_bundle('postfixadmin'):
|
|
assert node.has_bundle('letsencrypt')
|
|
|
|
files = {
|
|
'/etc/mailname': {
|
|
'content': node.metadata.get('postfix', {}).get('myhostname', node.metadata['hostname']),
|
|
'triggers': {
|
|
'svc_systemd:postfix:restart',
|
|
},
|
|
},
|
|
'/etc/postfix/master.cf': {
|
|
'content_type': 'mako',
|
|
'triggers': {
|
|
'svc_systemd:postfix:restart',
|
|
},
|
|
},
|
|
'/etc/postfix/main.cf': {
|
|
'content_type': 'mako',
|
|
'triggers': {
|
|
'svc_systemd:postfix:restart',
|
|
},
|
|
},
|
|
}
|
|
|
|
svc_systemd = {
|
|
'postfix': {
|
|
'needs': {
|
|
'file:/etc/postfix/master.cf',
|
|
'file:/etc/postfix/main.cf',
|
|
'pkg_apt:',
|
|
},
|
|
},
|
|
}
|