diff --git a/defaults/main/dhcpd_vars.yml b/defaults/main/dhcpd_vars.yml index b806e36..515fd80 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 : 20200215-124911 +dhcp_conf_revision : 20200322-002515 dhcp_ddns_style : none @@ -10,12 +10,12 @@ dhcp_authoritive : "True" dhcp_domain_name: "thezengarden.net" dhcp_default_lease : 86400 -dhcp_max_lease : 604800 +dhcp_max_lease : 2592000 dhcp_pxeboot_file : pxelinux.0 -dhcp_vlan: "{{ deploy_to | default('vlan1') }}" +dhcp_vlan: "{{ deploy_to | default('vlan99') }}" dhcp_networks: @@ -29,6 +29,18 @@ dhcp_networks: dns : 10.1.1.210 pxeboot : 10.1.1.193 + + vlan50: + subnet : 10.10.10.96 + netmask : 255.255.255.224 + router : 10.10.10.126 + range_from : 10.10.10.97 + range_to : 10.10.10.125 + broadcast : 10.10.10.127 + dns : 10.1.1.210 + pxeboot : 10.10.10.113 + + vlan55: subnet : 10.10.10.128 netmask : 255.255.255.224 @@ -39,6 +51,7 @@ dhcp_networks: dns : 10.1.1.210 pxeboot : 10.10.10.129 + vlan66: subnet : 10.10.10.224 netmask : 255.255.255.224 @@ -48,3 +61,13 @@ dhcp_networks: broadcast : 10.10.10.255 dns : 10.1.1.210 pxeboot : 10.10.10.225 + + + vlan99: + subnet : 192.168.1.0 + netmask : 255.255.255.0 + router : 192.168.1.1 + range_from : 192.168.1.10 + range_to : 192.168.1.254 + broadcast : 192.168.1.255 + dns : 192.168.1.1 diff --git a/templates/dhcpd_conf.j2 b/templates/dhcpd_conf.j2 index 18d8957..f04ccd5 100644 --- a/templates/dhcpd_conf.j2 +++ b/templates/dhcpd_conf.j2 @@ -27,8 +27,10 @@ subnet {{ dhcp_networks[dhcp_vlan].subnet }} netmask {{ dhcp_networks[dhcp_vlan] option domain-name "{{ dhcp_domain_name }}"; option domain-name-servers {{ dhcp_networks[dhcp_vlan].dns }}; - filename "{{ dhcp_pxeboot_file }}"; + {% if dhcp_networks[dhcp_vlan].pxeboot is defined %} +filename "{{ dhcp_pxeboot_file }}"; next-server {{ dhcp_networks[dhcp_vlan].pxeboot }}; + {% endif %} {% if static_assignments is defined %} ### STATIC ASSIGNMENTS ###