bundles/rspamd: dkim key can be a string, too
This commit is contained in:
parent
61062c8312
commit
fc0495f13a
1 changed files with 4 additions and 2 deletions
|
@ -71,6 +71,8 @@ if 'dkim' in node.metadata.get('rspamd', {}):
|
|||
},
|
||||
}
|
||||
|
||||
dkim_key = repo.libs.faults.ensure_fault_or_none(node.metadata['rspamd']['dkim'])
|
||||
|
||||
actions = {
|
||||
'rspamd_assure_dkim_key_permissions': {
|
||||
'command': 'chown _rspamd:_rspamd /var/lib/rspamd/dkim/*.key',
|
||||
|
@ -81,8 +83,8 @@ if 'dkim' in node.metadata.get('rspamd', {}):
|
|||
},
|
||||
},
|
||||
'rspamd_generate_dkim_key': {
|
||||
'command': node.metadata['rspamd']['dkim'].format_into('cd /var/lib/rspamd/dkim && /usr/bin/rspamadm dkim_keygen -s "{0}" -b 2048 -k "{0}.key" > "{0}.txt"'),
|
||||
'unless': node.metadata['rspamd']['dkim'].format_into('test -f "/var/lib/rspamd/dkim/{0}.key"'),
|
||||
'command': dkim_key.format_into('cd /var/lib/rspamd/dkim && /usr/bin/rspamadm dkim_keygen -s "{0}" -b 2048 -k "{0}.key" > "{0}.txt"'),
|
||||
'unless': dkim_key.format_into('test -f "/var/lib/rspamd/dkim/{0}.key"'),
|
||||
'needs': {
|
||||
'directory:/var/lib/rspamd/dkim',
|
||||
'pkg_apt:rspamd',
|
||||
|
|
Loading…
Reference in a new issue