diff --git a/bundles/dovecot/items.py b/bundles/dovecot/items.py index cc27259..437aa66 100644 --- a/bundles/dovecot/items.py +++ b/bundles/dovecot/items.py @@ -25,7 +25,6 @@ directories = { 'group': 'vmail', }, '/var/vmail/sieve/global': { - 'purge': True, 'owner': 'vmail', 'group': 'vmail', }, diff --git a/bundles/rspamd/files/local.d/ip_whitelist.map b/bundles/rspamd/files/local.d/ip_whitelist.map new file mode 100644 index 0000000..3558e96 --- /dev/null +++ b/bundles/rspamd/files/local.d/ip_whitelist.map @@ -0,0 +1,3 @@ +% for ip in sorted(node.metadata.get('rspamd/ip_whitelist')): +${ip} +% endfor diff --git a/bundles/rspamd/files/worker-controller.inc b/bundles/rspamd/files/local.d/worker-controller.inc similarity index 100% rename from bundles/rspamd/files/worker-controller.inc rename to bundles/rspamd/files/local.d/worker-controller.inc diff --git a/bundles/rspamd/items.py b/bundles/rspamd/items.py index c36d8df..9e567e3 100644 --- a/bundles/rspamd/items.py +++ b/bundles/rspamd/items.py @@ -24,25 +24,9 @@ directories = { }, } -files = { - '/etc/rspamd/local.d/ip_whitelist.map': { - 'content': '\n'.join( - sorted(node.metadata.get('rspamd/ip_whitelist')) - ) + '\n', - 'triggers': { - 'svc_systemd:rspamd:restart', - }, - }, - '/etc/rspamd/local.d/worker-controller.inc': { - 'content_type': 'mako', - 'triggers': { - 'svc_systemd:rspamd:restart', - }, - } -} - for f in listdir(join(f'{repo.path}/bundles/rspamd/files/local.d')): files[f'/etc/rspamd/local.d/{f}'] = { + 'content_type': 'mako', 'source': f'local.d/{f}', 'triggers': { 'svc_systemd:rspamd:restart', @@ -51,6 +35,7 @@ for f in listdir(join(f'{repo.path}/bundles/rspamd/files/local.d')): for f in listdir(join(f'{repo.path}/bundles/rspamd/files/override.d')): files[f'/etc/rspamd/override.d/{f}'] = { + 'content_type': 'mako', 'source': f'override.d/{f}', 'triggers': { 'svc_systemd:rspamd:restart',