diff --git a/defaults/main/dhcpd_vars.yml b/defaults/main/dhcpd_vars.yml index ad887b0..73596f6 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 : 20200322-002515 +dhcp_conf_version : 1.1 +dhcp_conf_revision : 241121-2139 dhcp_ddns_style : none diff --git a/templates/dhcpd_conf.j2 b/templates/dhcpd_conf.j2 index f04ccd5..e5b6e97 100644 --- a/templates/dhcpd_conf.j2 +++ b/templates/dhcpd_conf.j2 @@ -39,6 +39,9 @@ filename "{{ dhcp_pxeboot_file }}"; { hardware ethernet {{ static_assignments[host]['mac_address'] }}; fixed-address {{ static_assignments[host]['ip_address'] }}; +{% if static_assignments[host]['dns_server'] is defined %} + option domain-name-servers {{ static_assignments[host]['dns_server'] }}; +{% endif %} } {% endfor %} {% endif %}