summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/roles/mox/templates/domains.conf11
1 files changed, 3 insertions, 8 deletions
diff --git a/ansible/roles/mox/templates/domains.conf b/ansible/roles/mox/templates/domains.conf
index 6cbe58f..dad978c 100644
--- a/ansible/roles/mox/templates/domains.conf
+++ b/ansible/roles/mox/templates/domains.conf
@@ -53,10 +53,7 @@ MonitorDNSBLs:
WebHandlers:
-{% for subdomain in subdomains %}
-{% if subdomain.mox_handler != "none" %}
-
-{% if subdomain.mox_handler == "static" %}
+{% for subdomain in ( subdomains | selectattr("mox_handler", "eq", "static") ) %}
-
LogName: {{ subdomain.name }}.joeac.net
PathRegexp: ^/
@@ -84,8 +81,9 @@ WebHandlers:
WebRedirect:
OrigPathRegexp: ^(.*)/index.html$
ReplacePath: $1.html
+{% endfor %}
-{% elif subdomain.mox_handler == "forward" %}
+{% for subdomain in ( subdomains | selectattr("mox_handler", "eq", "forward") ) %}
-
LogName: {{ subdomain.name }}.joeac.net
PathRegexp: ^/
@@ -93,7 +91,4 @@ WebHandlers:
Domain: {{ subdomain.full_domain }}
WebForward:
URL: http://{{ hostvars[services[subdomain.service].host].ansible_host }}:{{ services[subdomain.service].port }}
-{% endif %}
-
-{% endif %}
{% endfor %}