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,16 +69,22 @@ if 'dkim' in node.metadata.get('rspamd', {}):
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
actions['rspamd_generate_dkim_key'] = {
|
actions = {
|
||||||
'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"'),
|
'rspamd_assure_dkim_key_permissions': {
|
||||||
'unless': node.metadata['rspamd']['dkim'].format_into('test -f "/var/lib/rspamd/dkim/{0}.key"'),
|
'command': 'chown _rspamd:_rspamd /var/lib/rspamd/dkim/*.key',
|
||||||
'needs': {
|
'needs': {
|
||||||
'directory:/var/lib/rspamd/dkim',
|
'action:rspamd_generate_dkim_key',
|
||||||
|
'directory:/var/lib/rspamd/dkim',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'needed_by': {
|
'rspamd_generate_dkim_key': {
|
||||||
'action:rspamd_assure_dkim_key_permissions',
|
'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"'),
|
||||||
}
|
'needs': {
|
||||||
|
'directory:/var/lib/rspamd/dkim',
|
||||||
|
'pkg_apt:rspamd',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
if 'password' in node.metadata.get('rspamd', {}):
|
if 'password' in node.metadata.get('rspamd', {}):
|
||||||
files['/etc/rspamd/local.d/worker-controller.inc'] = {
|
files['/etc/rspamd/local.d/worker-controller.inc'] = {
|
||||||
|
|
Loading…
Reference in a new issue