zen_dhcpd/templates/dhcpd_conf.j2
Chris Hammer ad747c764d 0.1.10-DEV-20200322-002515
--------------------------
    * ADD:
      - added vlan50 support
      - added dummy vlan99 for a default to deploy

    * MODIFY:
      - modified dhcp_max_lease to be 7 days
      - modified templates/dhcpd_conf.j2 to include logic if pxeboot server is defined or not
2020-03-22 00:29:59 -04:00

46 lines
1.5 KiB
Django/Jinja

#####################################################
# The Zen Garden Network #
# #
# Configuration : {{ dhcp_conf_file }} #
# Version : {{ dhcp_conf_version }}-{{ dhcp_conf_revision }} #
# #
# Chris H. <chris@thezengarden.net> #
#####################################################
ddns-update-style {{ dhcp_ddns_style }};
option domain-name "{{ dhcp_domain_name }}";
default-lease-time {{ dhcp_default_lease }};
max-lease-time {{ dhcp_max_lease }};
{% if dhcp_authoritive == 'True' %}
authoritative;
{% endif %}
subnet {{ dhcp_networks[dhcp_vlan].subnet }} netmask {{ dhcp_networks[dhcp_vlan].netmask }}
{
range {{ dhcp_networks[dhcp_vlan].range_from }} {{ dhcp_networks[dhcp_vlan].range_to }};
option routers {{ dhcp_networks[dhcp_vlan].router }};
option broadcast-address {{ dhcp_networks[dhcp_vlan].broadcast }};
option domain-name "{{ dhcp_domain_name }}";
option domain-name-servers {{ dhcp_networks[dhcp_vlan].dns }};
{% 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 ###
{% for host in static_assignments %}
host {{ host }}
{
hardware ethernet {{ static_assignments[host]['mac_address'] }};
fixed-address {{ static_assignments[host]['ip_address'] }};
}
{% endfor %}
{% endif %}
}