aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/templates
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2019-04-07 22:32:14 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2019-04-07 22:32:14 +0200
commit01f1f2eceab41cdfce42f63f30c2b63de0f04382 (patch)
treebef90f9edbfa64b86467c21b28dccdbee426c733 /roles/space_server/templates
parent6ced188dd2660a6ae49abbc6ab6e20e9c3e70f2f (diff)
downloadlabitat-ansible-01f1f2eceab41cdfce42f63f30c2b63de0f04382.tar.gz
labitat-ansible-01f1f2eceab41cdfce42f63f30c2b63de0f04382.tar.xz
labitat-ansible-01f1f2eceab41cdfce42f63f30c2b63de0f04382.zip
space_server: dhcpd: only do ddns for sane hostnames
Diffstat (limited to 'roles/space_server/templates')
-rw-r--r--roles/space_server/templates/dhcpd.conf.j28
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/space_server/templates/dhcpd.conf.j2 b/roles/space_server/templates/dhcpd.conf.j2
index a156c52..d2e2ab6 100644
--- a/roles/space_server/templates/dhcpd.conf.j2
+++ b/roles/space_server/templates/dhcpd.conf.j2
@@ -75,7 +75,7 @@ subnet 10.42.1.0 netmask 255.255.255.0 {
next-server 10.42.1.1;
filename "pxelinux.0";
- if exists host-name {
+ if exists host-name and option host-name ~= "^[0-9A-Za-z-]*$" {
ddns-hostname = option host-name;
ddns-domainname "dhcp";
} else {
@@ -98,7 +98,7 @@ subnet 10.42.2.0 netmask 255.255.255.0 {
next-server 10.42.2.1;
filename "pxelinux.0";
- if exists host-name {
+ if exists host-name and option host-name ~= "^[0-9A-Za-z-]*$" {
ddns-hostname = option host-name;
ddns-domainname "dhcp";
} else {
@@ -119,7 +119,7 @@ subnet 10.42.3.0 netmask 255.255.255.0 {
option domain-name-servers 185.38.175.0;
#option ntp-servers 90.185.0.18;
- if exists host-name {
+ if exists host-name and option host-name ~= "^[0-9A-Za-z-]*$" {
ddns-hostname = option host-name;
ddns-domainname "dhcp";
} else {
@@ -140,7 +140,7 @@ subnet 10.42.3.0 netmask 255.255.255.0 {
# option domain-name-servers 185.38.175.0;
# #option ntp-servers 90.185.0.18;
#
-# if exists host-name {
+# if exists host-name and option host-name ~= "^[0-9A-Za-z-]*$" {
# ddns-hostname = option host-name;
# ddns-domainname "dhcp";
# } else {