|
@@ -1,21 +1,21 @@
|
1
|
1
|
#Dynamic DNS security settings
|
2
|
2
|
key "key-internal" {
|
3
|
3
|
algorithm HMAC-MD5;
|
4
|
|
- secret "DNS_TSIG_KEY_INTERNAL_SECRET";
|
|
4
|
+ secret "{{ salt['pillar.get']("model:dns:tsig:keys:internal") }}";
|
5
|
5
|
};
|
6
|
6
|
|
7
|
|
-zone DHCP_DYN_IPS_DOMAIN {
|
8
|
|
- primary DHCP_DNS_MASTER;
|
|
7
|
+zone {{ salt['pillar.get']("model:dhcp:dns:dynIpsDomain") }} {
|
|
8
|
+ primary {{ salt['pillar.get']("model:dhcp:dns:master") }};
|
9
|
9
|
key "key-internal";
|
10
|
10
|
}
|
11
|
11
|
|
12
|
|
-zone DHCP_SITE_DOMAIN {
|
13
|
|
- primary DHCP_DNS_MASTER;
|
|
12
|
+zone {{ salt['pillar.get']("model:dhcp:dns:siteDomain") }} {
|
|
13
|
+ primary {{ salt['pillar.get']("model:dhcp:dns:master") }};
|
14
|
14
|
key "key-internal";
|
15
|
15
|
}
|
16
|
16
|
|
17
|
|
-zone DHCP_REV_DOMAIN {
|
18
|
|
- primary DHCP_DNS_MASTER;
|
|
17
|
+zone {{ salt['pillar.get']("model:dhcp:dns:revDomain") }} {
|
|
18
|
+ primary {{ salt['pillar.get']("model:dhcp:dns:master") }};
|
19
|
19
|
key "key-internal";
|
20
|
20
|
}
|
21
|
21
|
|
|
@@ -49,35 +49,35 @@ use-host-decl-names on;
|
49
|
49
|
authoritative;
|
50
|
50
|
log-facility local7;
|
51
|
51
|
|
52
|
|
-subnet DHCP_SUBNET netmask DHCP_NETMASK {
|
|
52
|
+subnet {{ salt['pillar.get']("model:dhcp:subnet") }} netmask {{ salt['pillar.get']("model:dhcp:netmask") }} {
|
53
|
53
|
|
54
|
54
|
# Dynamic DNS update
|
55
|
|
- ddns-domainname "DHCP_DYN_IPS_DOMAIN";
|
|
55
|
+ ddns-domainname "{{ salt['pillar.get']("model:dhcp:dns:dynIpsDomain") }}";
|
56
|
56
|
update-conflict-detection false;
|
57
|
57
|
|
58
|
58
|
# IP settings
|
59
|
|
- range DHCP_IP_FIRST DHCP_IP_LAST;
|
60
|
|
- option subnet-mask DHCP_NETMASK;
|
61
|
|
- option broadcast-address DHCP_BROADCAST;
|
62
|
|
- option routers DHCP_ROUTERS;
|
|
59
|
+ range {{ salt['pillar.get']("model:dhcp:ipFirst") }} {{ salt['pillar.get']("model:dhcp:ipLast") }};
|
|
60
|
+ option subnet-mask {{ salt['pillar.get']("model:dhcp:netmask") }};
|
|
61
|
+ option broadcast-address {{ salt['pillar.get']("model:dhcp:broadcast") }};
|
|
62
|
+ option routers {{ salt['pillar.get']("model:dhcp:routers:ips") | join(", ") }};
|
63
|
63
|
|
64
|
64
|
# UniFi settings
|
65
|
|
- option ubnt.unifi-address DHCP_UNIFI_CONTROLLER_IP;
|
|
65
|
+ option ubnt.unifi-address {{ salt['pillar.get']("model:dhcp:unifiController:ip") }};
|
66
|
66
|
|
67
|
67
|
# DNS settings
|
68
|
|
- option domain-name "DHCP_SITE_DOMAIN";
|
69
|
|
- option domain-search "DHCP_SITE_DOMAIN", "DHCP_DOMAIN", "DHCP_DYN_IPS_DOMAIN";
|
70
|
|
- option domain-name-servers DHCP_DNS_SERVERS;
|
|
68
|
+ option domain-name "{{ salt['pillar.get']("model:dhcp:dns:siteDomain") }}";
|
|
69
|
+ option domain-search "{{ salt['pillar.get']("model:dhcp:dns:siteDomain") }}", "{{ salt['pillar.get']("model:dhcp:dns:domain") }}", "{{ salt['pillar.get']("model:dhcp:dns:dynIpsDomain") }}";
|
|
70
|
+ option domain-name-servers {{ salt['pillar.get']("model:dhcp:dns:servers") | join(", ") }};
|
71
|
71
|
|
72
|
72
|
# Push custom routes to clients
|
73
|
73
|
#option classless-routes 24, 10,15,42, 10.15.12,2;
|
74
|
74
|
#option classless-routes-win 24, 10,15,42, 10.15.12,2;
|
75
|
75
|
|
76
|
76
|
# Netboot settings
|
77
|
|
- next-server DHCP_TFTP_SERVER;
|
|
77
|
+ next-server {{ salt['pillar.get']("model:dhcp:tftp:server") }};
|
78
|
78
|
#option root-path "10.15.100.1:/pxeroot/ubuntu";
|
79
|
79
|
if exists user-class and ( option user-class = "iPXE-rthoni" ) {
|
80
|
|
- option domain-search "DHCP_SITE_DOMAIN";
|
|
80
|
+ option domain-search "{{ salt['pillar.get']("model:dhcp:dns:siteDomain") }}";
|
81
|
81
|
filename "http://netboot/boot.ipxe";
|
82
|
82
|
}
|
83
|
83
|
else {
|
|
@@ -87,7 +87,7 @@ subnet DHCP_SUBNET netmask DHCP_NETMASK {
|
87
|
87
|
# Static IP hosts
|
88
|
88
|
group {
|
89
|
89
|
include "/etc/dhcp/config/static_ips.conf";
|
90
|
|
- ddns-domainname "DHCP_SITE_DOMAIN";
|
|
90
|
+ ddns-domainname "{{ salt['pillar.get']("model:dhcp:dns:siteDomain") }}";
|
91
|
91
|
option host-name = host-decl-name;
|
92
|
92
|
ddns-hostname = config-option host-name;
|
93
|
93
|
}
|