Browse Source

Added additional zones in dhcp config

tags/v3.0.0
Robin Thoni 5 years ago
parent
commit
429e6e4963
2 changed files with 4 additions and 11 deletions
  1. 1
    0
      env
  2. 3
    11
      isc-dhcp/config/states/isc-dhcp/dhcpd.conf

+ 1
- 0
env View File

@@ -8,6 +8,7 @@ GCF.dhcp.dns.domain="example.com"
8 8
 GCF.dhcp.dns.siteDomain="site1.example.com"
9 9
 GCF.dhcp.dns.dynIpsDomain="dhcp.site1.example.com"
10 10
 GCF.dhcp.dns.revDomain="100.15.10.in-addr.arpa."
11
+GCF.dhcp.dns.additionalZones=["101.15.10.in-addr.arpa.", "102.15.10.in-addr.arpa."]
11 12
 
12 13
 GCF.dhcp.subnet="10.15.100.0"
13 14
 GCF.dhcp.netmask="255.255.255.0"

+ 3
- 11
isc-dhcp/config/states/isc-dhcp/dhcpd.conf View File

@@ -4,20 +4,12 @@ key "key-internal" {
4 4
         secret "{{ salt['pillar.get']("model:dns:tsig:keys:internal") }}";
5 5
 };
6 6
 
7
-zone {{ salt['pillar.get']("model:dhcp:dns:dynIpsDomain") }} {
8
-    primary {{ salt['pillar.get']("model:dhcp:dns:master") }};
9
-    key "key-internal";
10
-}
11
-
12
-zone {{ salt['pillar.get']("model:dhcp:dns:siteDomain") }} {
13
-    primary {{ salt['pillar.get']("model:dhcp:dns:master") }};
14
-    key "key-internal";
15
-}
16
-
17
-zone {{ salt['pillar.get']("model:dhcp:dns:revDomain") }} {
7
+{% for zone in (salt['pillar.get']("model:dhcp:dns:additionalZones", []) + [salt['pillar.get']("model:dhcp:dns:dynIpsDomain"), salt['pillar.get']("model:dhcp:dns:siteDomain"), salt['pillar.get']("model:dhcp:dns:revDomain")]) %}
8
+zone {{ zone }} {
18 9
     primary {{ salt['pillar.get']("model:dhcp:dns:master") }};
19 10
     key "key-internal";
20 11
 }
12
+{% endfor %}
21 13
 
22 14
 
23 15
 # Custom routes classes

Loading…
Cancel
Save