{% import 'macros.j2' as print with context %} # {{ ansible_managed }} {% if dhcpd_authoritative is defined and dhcpd_authoritative %} authoritative; {% elif dhcpd_authoritative is undefined or (dhcpd_authoritative is defined and not dhcpd_authoritative) %} not authoritative; {% endif %} {% if dhcpd_global_options is defined and dhcpd_global_options %} # Global configuration options {{ dhcpd_global_options }} {% endif %} {% if dhcpd_options is defined and dhcpd_options %} # Configuration options {{ dhcpd_options }} {% endif %} {% if dhcpd_keys is defined and dhcpd_keys %} {% for key in dhcpd_keys %} {{ print.key(key) }} {% endfor %} {% endif %} {% if dhcpd_classes is defined and dhcpd_classes %} {% for class in dhcpd_classes %} {{ print.class(class) }} {% endfor %} {% endif %} {% if dhcpd_failovers is defined and dhcpd_failovers %} {% for failover in dhcpd_failovers %} {{ print.failover(failover) }} {% endfor %} {% endif %} {% if dhcpd_shared_networks is defined and dhcpd_shared_networks %} {% for network in dhcpd_shared_networks %} {% if network.subnets is defined and network.subnets %} {% if network.comment is defined and network.comment %} # {{ network.comment }} {% endif %} shared-network "{{ network.name }}" { {% if network.options is defined and network.options %} {{ network.options | indent(8,true) }} {% endif %} {% if network.include is defined and network.include %} include "{{ network.include }}"; {% endif %} {% for subnet in network.subnets %} {{ print.subnet(subnet) | indent(8,true) }} {% endfor %} } {% endif %} {% endfor %} {% endif %} {% if dhcpd_groups is defined and dhcpd_groups %} {% for group in dhcpd_groups %} {{ print.group(group) }} {% endfor %} {% endif %} {% if dhcpd_subnets is defined and dhcpd_subnets %} {% for subnet in dhcpd_subnets %} {{ print.subnet(subnet) }} {% endfor %} {% endif %} {% if dhcpd_hosts is defined and dhcpd_hosts %} {{ print.hosts(dhcpd_hosts) }} {% endif %} {% if dhcpd_includes is defined and dhcpd_includes %} {% for include in dhcpd_includes %} include "{{ include }}"; {% endfor %} {% endif %} {# vim: ft=dhcpd #}