aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/dns/templates/zones/233233.xyz.zone.j212
1 files changed, 11 insertions, 1 deletions
diff --git a/roles/dns/templates/zones/233233.xyz.zone.j2 b/roles/dns/templates/zones/233233.xyz.zone.j2
index efe0716..9f41554 100644
--- a/roles/dns/templates/zones/233233.xyz.zone.j2
+++ b/roles/dns/templates/zones/233233.xyz.zone.j2
@@ -21,8 +21,18 @@ $TTL {{ dns.ttl }}
@ IN A {{ network.ipv4.address }}
@ IN AAAA {{ network.ipv6.address }}
-{% for name in ["www", "d", "g", "zw", "*"] %}
+{% set subdomains = [] %}
+{% for name in domains -%}
+ {%- if name["name"] == domain -%}
+ {%- for sub in name["sub"] -%}
+ {{ subdomains.append(sub) }}
+ {%- endfor -%}
+ {%- endif -%}
+{%- endfor %}
+{% for name in subdomains %}
{{ name }} IN CNAME @
{% endfor %}
+* IN CNAME @
+
; vim: set ft=bindzone: