2020-11-07 21:31:29 +00:00
|
|
|
assert node.has_bundle('php')
|
|
|
|
assert node.has_bundle('postfix')
|
|
|
|
|
|
|
|
directories = {
|
|
|
|
'/opt/postfixadmin': {},
|
|
|
|
'/opt/postfixadmin/templates_c': {
|
|
|
|
'owner': 'www-data',
|
|
|
|
'group': 'www-data',
|
|
|
|
'needs': {
|
|
|
|
'git_deploy:/opt/postfixadmin',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/var/mail/vmail': {
|
|
|
|
'owner': 'nobody',
|
|
|
|
'group': 'nogroup',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
git_deploy = {
|
|
|
|
'/opt/postfixadmin': {
|
|
|
|
'repo': 'https://github.com/postfixadmin/postfixadmin.git',
|
2021-01-29 17:07:57 +00:00
|
|
|
'rev': 'postfixadmin-{}'.format(node.metadata['postfixadmin']['version']),
|
2020-11-07 21:31:29 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files = {
|
|
|
|
'/opt/postfixadmin/config.local.php': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': {
|
|
|
|
'setup_password': node.metadata['postfixadmin']['setup_password'],
|
|
|
|
'admin_email': node.metadata['postfixadmin']['admin_email'],
|
2020-11-10 11:37:58 +00:00
|
|
|
'database_password': node.metadata['postgresql']['roles']['postfixadmin']['password'],
|
2020-11-07 21:31:29 +00:00
|
|
|
},
|
|
|
|
'needs': {
|
|
|
|
'git_deploy:/opt/postfixadmin',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/postfix/pgsql/relay_domains.cf': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:postfix:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/postfix/pgsql/virtual_alias_maps.cf': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:postfix:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/postfix/pgsql/virtual_domains_maps.cf': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:postfix:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'/etc/postfix/pgsql/virtual_mailbox_maps.cf': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:postfix:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|