From b23b0c58b9683069c6d4fbba088a81b3f80a49f5 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Sat, 15 Feb 2020 00:54:45 -0500 Subject: [PATCH] 0.1.8-DEV-20200215-125347 ------------------------- * ADD: - added vlan66 support * MODIFY: - modified templates/dhcpd_conf.j2 to utilize static assignments only if defined --- defaults/main/dhcpd_vars.yml | 16 +++++++++++++--- templates/dhcpd_conf.j2 | 6 +++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/defaults/main/dhcpd_vars.yml b/defaults/main/dhcpd_vars.yml index 440f39c..b806e36 100644 --- a/defaults/main/dhcpd_vars.yml +++ b/defaults/main/dhcpd_vars.yml @@ -1,7 +1,7 @@ --- dhcp_conf_file : /etc/dhcp/dhcpd.conf dhcp_conf_version : 1.0 -dhcp_conf_revision : 20200214-13647 +dhcp_conf_revision : 20200215-124911 dhcp_ddns_style : none @@ -33,8 +33,18 @@ dhcp_networks: subnet : 10.10.10.128 netmask : 255.255.255.224 router : 10.10.10.158 - range_from : 10.10.10.147 - range_to : 10.10.10.149 + range_from : 10.10.10.129 + range_to : 10.10.10.158 broadcast : 10.10.10.159 dns : 10.1.1.210 pxeboot : 10.10.10.129 + + vlan66: + subnet : 10.10.10.224 + netmask : 255.255.255.224 + router : 10.10.10.254 + range_from : 10.10.10.226 + range_to : 10.10.10.253 + broadcast : 10.10.10.255 + dns : 10.1.1.210 + pxeboot : 10.10.10.225 diff --git a/templates/dhcpd_conf.j2 b/templates/dhcpd_conf.j2 index b588a33..18d8957 100644 --- a/templates/dhcpd_conf.j2 +++ b/templates/dhcpd_conf.j2 @@ -2,7 +2,7 @@ # The Zen Garden Network # # # # Configuration : {{ dhcp_conf_file }} # -# Version : {{ dhcp_conf_version }}-{{ dhcp_conf_revision }} # +# Version : {{ dhcp_conf_version }}-{{ dhcp_conf_revision }} # # # # Chris H. # ##################################################### @@ -30,7 +30,7 @@ subnet {{ dhcp_networks[dhcp_vlan].subnet }} netmask {{ dhcp_networks[dhcp_vlan] filename "{{ dhcp_pxeboot_file }}"; next-server {{ dhcp_networks[dhcp_vlan].pxeboot }}; - +{% if static_assignments is defined %} ### STATIC ASSIGNMENTS ### {% for host in static_assignments %} host {{ host }} @@ -39,5 +39,5 @@ subnet {{ dhcp_networks[dhcp_vlan].subnet }} netmask {{ dhcp_networks[dhcp_vlan] fixed-address {{ static_assignments[host]['ip_address'] }}; } {% endfor %} - +{% endif %} }