dhcpd.conf.j2 834 B

1234567891011121314151617181920212223242526
  1. # This file is managed by ansible, don't make changes here - they will be overwritten.
  2. default-lease-time {{dhcp_global.lease_default}};
  3. max-lease-time {{dhcp_global.lease_max}};
  4. authoritative;
  5. log-facility local7;
  6. subnet {{ff_network.v4_network | ipaddr('network')}} netmask {{ff_network.v4_network | ipaddr('netmask')}} {
  7. range {{dhcp.range_start}} {{dhcp.range_end}};
  8. option routers {{ff_network.v4_network | ipaddr(server_id) | ipaddr('address') }};
  9. option domain-name-servers {{ff_network.v4_network | ipaddr(server_id) | ipaddr('address') }};
  10. option interface-mtu {{dhcp_global.mtu}};
  11. }
  12. {% if "static_hosts" in hostvars[inventory_hostname] %}
  13. {% for host in static_hosts %}
  14. host {{host.name}} {
  15. hardware ethernet {{host.mac_address}};
  16. fixed-address {{host.v4_address}};
  17. }
  18. {% endfor %}
  19. {% endif %}