bundlewrap/bundles/postfix/items.py

53 lines
1.1 KiB
Python
Raw Normal View History

2020-11-07 21:31:18 +00:00
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',
},
},
2020-11-09 09:52:24 +00:00
'/etc/aliases': {
'content_type': 'mako',
'triggers': {
'action:postfix_newaliases',
},
},
2020-11-07 21:31:18 +00:00
'/etc/postfix/master.cf': {
'content_type': 'mako',
'triggers': {
'svc_systemd:postfix:restart',
},
},
'/etc/postfix/main.cf': {
'content_type': 'mako',
'triggers': {
'svc_systemd:postfix:restart',
},
},
2020-11-10 09:21:37 +00:00
'/usr/local/share/icinga/plugins/check_postfix_queue': {
'mode': '0755',
},
2020-11-07 21:31:18 +00:00
}
2020-11-09 09:52:24 +00:00
actions = {
'postfix_newaliases': {
'command': 'newaliases',
'triggered': True,
'needs': {
'pkg_apt:postfix',
},
2020-11-09 09:52:24 +00:00
},
}
2020-11-07 21:31:18 +00:00
svc_systemd = {
'postfix': {
'needs': {
'file:/etc/postfix/master.cf',
'file:/etc/postfix/main.cf',
'pkg_apt:',
},
},
}