debops.dhcpd default variables

General options

dhcpd_mode

What service type to configure on this host:

  • server: host is an ISC DHCP server, see dhcpd(8)
  • relay: host is an ISC DHCP relay, see dhcrelay(8)
dhcpd_mode: 'server'
dhcpd_ipversion

Internet Protocol version to configure: 4 or 6

dhcpd_ipversion: '4'

ISC DHCP Relay configuration

dhcpd_relay_servers

List of DHCP servers which should receive the relayed packets

dhcpd_relay_servers: [ '{{ ansible_default_ipv4.gateway
                           if (ansible_default_ipv4.gateway|d())
                           else [] }}' ]
dhcpd_relay_interfaces

List of network interfaces that dhcrelay should listen on

dhcpd_relay_interfaces: []
dhcpd_relay_options

Additional dhcrelay options

dhcpd_relay_options: '{{ "-" + dhcpd_ipversion }}'

ISC DHCP Server configuration

dhcpd_server_options

dhcpd(8) options

dhcpd_server_options: '{{ "-" + dhcpd_ipversion }}'

DHCP main configuration

dhcpd_authoritative

Is this DHCP server authoritative?

dhcpd_authoritative: False
dhcpd_log_facility

Log facility to use

dhcpd_log_facility: 'local7'
dhcpd_interfaces

List of network interfaces to listen on for DHCP requests If this list is empty, Ansible will try to guess correct interfaces automatically

dhcpd_interfaces: []
dhcpd_lease_time

Max lease time in hours (default lease time is calculated below)

dhcpd_lease_time: '24'
dhcpd_global_default_lease_time

Default lease time for all IP address leases (18 hours)

dhcpd_global_default_lease_time: '{{ (((dhcpd_lease_time|int / 2) + 6) * 60 * 60)|round|int }}'
dhcpd_global_max_lease_time

Maximum lease time for all IP addresses (24 hours)

dhcpd_global_max_lease_time: '{{ (dhcpd_lease_time|int * 60 * 60)|round|int }}'

DHCP advertised options

dhcpd_auto_options

If enabled, ISC DHCP server will be configured with a set of automatically detected options. See auto_options.j2 template for more details.

dhcpd_auto_options: True
dhcpd_domain_name

Default host domain to advertise

dhcpd_domain_name: '{{ ansible_domain }}'

List of additional domains which should be checked when looking for hostnames

dhcpd_domain_search: []
dhcpd_nameservers

List of nameservers to advertise by default If it's not specified, nameservers from /etc/resolv.conf will be used instead.

dhcpd_nameservers: []
dhcpd_options

Custom global options formatted as a text block

dhcpd_options: False

iPXE support

dhcpd_ipxe

Add iPXE-specific options to ISC DHCP server configuration.

dhcpd_ipxe: False
dhcpd_ipxe_dhcp_space

Add DHCP options iPXE namespace in dhcpd.conf required to support iPXE-specific DHCP options in the DHCP server configuration.

dhcpd_ipxe_dhcp_space: True
dhcpd_ipxe_chain_filename

Initial file sent to hosts which requested a PXE boot, used to chain-load iPXE boot loader.

dhcpd_ipxe_chain_filename: 'undionly.kpxe'
dhcpd_ipxe_efi_chain_filename

Initial file sent to hosts using EFI which requested a PXE boot, used to chain-load iPXE boot loader.

dhcpd_ipxe_efi_chain_filename: 'ipxe.efi'
dhcpd_ipxe_filename

File sent to hosts booted with iPXE, by default load the standard menu file.

dhcpd_ipxe_filename: 'menu.ipxe'
dhcpd_ipxe_options

Additional DHCP options in a YAML text block format, added in the iPXE section of the configuration.

dhcpd_ipxe_options: ''

ISC DHCP Server configuration scopes

These lists allow you to generate nested configuration scopes in dhcpd.conf. Most of the information about them can be found in dhcpd.conf(5) manual page. You can create nested configuration using Ansible variable expansion.

dhcpd_keys

List of secret keys used for Dynamic DNS configuration. See dhcpd_keys for more details.

dhcpd_keys: []
dhcpd_zones

List of DNS zones to update with Dynamic DNS configuration. See dhcpd_zones for more details.

dhcpd_zones: []
dhcpd_classes

List of client classes (see dhcpd.conf(5)). More informaction can be found in dhcpd_classes.

dhcpd_classes: []
dhcpd_groups

List of configuration scopes groped together. See dhcpd_groups for more details.

dhcpd_groups: []
dhcpd_shared_networks

List of shared networks grouping specified subnets together. See dhcpd_shared_networks for more details.

dhcpd_shared_networks: []
dhcpd_subnets

List of subnets not in a shared network. See dhcpd_subnets for more details.

dhcpd_subnets: [ '{{ dhcpd_subnet_default[dhcpd_ipversion] }}' ]
dhcpd_subnet_default

Default subnet managed automatically

dhcpd_subnet_default:
  '4':
    subnet: '{{ ansible_default_ipv4.network + "/" + ansible_default_ipv4.netmask }}'
    routers: '{{ ansible_default_ipv4.gateway | default("") }}'
    comment: 'Generated automatically by Ansible'
  '6':
    subnet: '{{ ((ansible_default_ipv6.address + "/" + ansible_default_ipv6.prefix)
                 if ansible_default_ipv6.address|d() else "") }}'
    comment: 'Generated automatically by Ansible'
dhcpd_hosts

Global list of hosts in DHCP. See ref:dhcpd_hosts for more details.

dhcpd_hosts: []
dhcpd_includes

List of external files to include. See dhcpd_includes for more details.

dhcpd_includes: []
dhcpd_failovers

DHCP failover configuration. See dhcpd_failovers for more details.

dhcpd_failovers: []