diff --git a/bundles/rspamd/metadata.py b/bundles/rspamd/metadata.py index 472aefd..3614bc6 100644 --- a/bundles/rspamd/metadata.py +++ b/bundles/rspamd/metadata.py @@ -10,21 +10,29 @@ defaults = { 'rspamd': {}, }, }, - 'nginx': { - 'vhosts': { - 'rspamd.sublimity.de': { - 'content': 'nginx/proxy_pass.conf', - 'context': { - 'target': 'http://localhost:11334', + 'rspamd': { + 'web_password': repo.vault.password_for(node.name + ' rspamd web password'), + 'ip_whitelist': set(), + }, +} + + +@metadata_reactor.provides( + 'nginx/vhosts', +) +def nginx_vhost(metadata): + return { + 'nginx': { + 'vhosts': { + metadata.get('rspamd/hostname'): { + 'content': 'nginx/proxy_pass.conf', + 'context': { + 'target': 'http://localhost:11334', + }, }, }, }, - }, - 'rspamd': { - 'web_password': repo.vault.password_for(node.name + ' rspamd web password'), - 'ip_whitelist': [], - }, -} + } @metadata_reactor.provides( diff --git a/nodes/htz.mails.py b/nodes/htz.mails.py index 9b1a271..1bdd129 100644 --- a/nodes/htz.mails.py +++ b/nodes/htz.mails.py @@ -81,6 +81,9 @@ 'woodpipe.de', ], }, + 'rspamd': { + 'hostname': 'rspamd.sublimity.de', + }, 'nginx': { 'vhosts': { 'cloud.sublimity.de': {