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

33
bundles/postfix/items.py Normal file
View file

@ -0,0 +1,33 @@
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:',
},
},
}