bundles/rspamd: fix dependencies
This commit is contained in:
parent
65db8b1625
commit
63d455d242
1 changed files with 15 additions and 18 deletions
|
@ -30,7 +30,6 @@ directories = {
|
||||||
svc_systemd = {
|
svc_systemd = {
|
||||||
'rspamd': {
|
'rspamd': {
|
||||||
'needs': {
|
'needs': {
|
||||||
'file:',
|
|
||||||
'pkg_apt:rspamd',
|
'pkg_apt:rspamd',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -56,14 +55,6 @@ files = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
actions = {
|
|
||||||
'rspamd_assure_dkim_key_permissions': {
|
|
||||||
'command': 'chown _rspamd:_rspamd /var/lib/rspamd/dkim/*.key',
|
|
||||||
'needs': {
|
|
||||||
'directory:/var/lib/rspamd/dkim',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
if 'dkim' in node.metadata.get('rspamd', {}):
|
if 'dkim' in node.metadata.get('rspamd', {}):
|
||||||
for i in {'arc', 'dkim_signing'}:
|
for i in {'arc', 'dkim_signing'}:
|
||||||
|
@ -78,14 +69,20 @@ if 'dkim' in node.metadata.get('rspamd', {}):
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
actions['rspamd_generate_dkim_key'] = {
|
actions = {
|
||||||
|
'rspamd_assure_dkim_key_permissions': {
|
||||||
|
'command': 'chown _rspamd:_rspamd /var/lib/rspamd/dkim/*.key',
|
||||||
|
'needs': {
|
||||||
|
'action:rspamd_generate_dkim_key',
|
||||||
|
'directory:/var/lib/rspamd/dkim',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'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"'),
|
'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"'),
|
'unless': node.metadata['rspamd']['dkim'].format_into('test -f "/var/lib/rspamd/dkim/{0}.key"'),
|
||||||
'needs': {
|
'needs': {
|
||||||
'directory:/var/lib/rspamd/dkim',
|
'directory:/var/lib/rspamd/dkim',
|
||||||
},
|
'pkg_apt:rspamd',
|
||||||
'needed_by': {
|
|
||||||
'action:rspamd_assure_dkim_key_permissions',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue