0.1.4-DEV-20200214-14428

------------------------
    * ADD:
      - added support for deployment to specific vlan via -e command line switch; defaults to vlan1
This commit is contained in:
Chris Hammer 2020-02-14 01:46:36 -05:00
parent a587e062d1
commit 6009270a7e
2 changed files with 33 additions and 20 deletions

View File

@ -1,7 +1,7 @@
--- ---
dhcp_conf_file : /etc/dhcp/dhcpd.conf dhcp_conf_file : /etc/dhcp/dhcpd.conf
dhcp_conf_version : 1.0 dhcp_conf_version : 1.0
dhcp_conf_revision : 20200212-125405 dhcp_conf_revision : 20200214-13647
dhcp_ddns_style : none dhcp_ddns_style : none
@ -12,16 +12,29 @@ dhcp_domain_name: "thezengarden.net"
dhcp_default_lease : 86400 dhcp_default_lease : 86400
dhcp_max_lease : 604800 dhcp_max_lease : 604800
dhcp_pxeboot_file : pxelinux.0
dhcp_subnet : 10.1.1.0
dhcp_netmask : 255.255.255.0
dhcp_router : 10.1.1.10
dhcp_range_from : 10.1.1.161
dhcp_range_to : 10.1.1.199
dhcp_broadcast : 10.1.1.255
dhcp_dns : 10.1.1.210
# pxeboot stuff dhcp_deploy_to: vlan1
pxeboot_file : pxelinux.0
pxeboot_server : 10.1.1.193
dhcp_networks:
vlan1:
subnet : 10.1.1.0
netmask : 255.255.255.0
router : 10.1.1.10
range_from : 10.1.1.161
range_to : 10.1.1.199
broadcast : 10.1.1.255
dns : 10.1.1.210
pxeboot : 10.1.1.193
vlan55:
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
broadcast : 10.10.10.159
dns : 10.1.1.210
pxeboot : 10.10.10.129

View File

@ -19,14 +19,14 @@ max-lease-time {{ dhcp_max_lease }};
authoritative; authoritative;
{% endif %} {% endif %}
subnet {{ dhcp_subnet }} netmask {{ dhcp_netmask }} subnet {{ dhcp_networks[dhcp_deploy_to].subnet }} netmask {{ dhcp_networks[dhcp_deploy_to].netmask }}
{ {
range {{ dhcp_range_from }} {{ dhcp_range_to }}; range {{ dhcp_networks[dhcp_deploy_to].range_from }} {{ dhcp_networks[dhcp_deploy_to].range_to }};
option routers {{ dhcp_router }}; option routers {{ dhcp_networks[dhcp_deploy_to].router }};
option broadcast-address {{ dhcp_broadcast }}; option broadcast-address {{ dhcp_networks[dhcp_deploy_to].broadcast }};
option domain-name "{{ dhcp_domain_name }}"; option domain-name "{{ dhcp_domain_name }}";
option domain-name-servers {{ dhcp_dns }}; option domain-name-servers {{ dhcp_networks[dhcp_deploy_to].dns }};
filename "{{ pxeboot_file }}"; filename "{{ dhcp_pxeboot_file }}";
next-server {{ pxeboot_server }}; next-server {{ dhcp_networks[dhcp_deploy_to].pxeboot }};
} }