--- # Default variables # ================= # .. contents:: Sections # :local: # # ------------------- # General options # ------------------- # .. envvar:: 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' # .. envvar:: dhcpd_ipversion # # Internet Protocol version to configure: ``4`` or ``6`` dhcpd_ipversion: '4' # .. envvar:: dhcpd_base_packages_map # # What packages should be installed, depending on mode of operation dhcpd_base_packages_map: 'server': [ 'isc-dhcp-server' ] 'relay': [ 'isc-dhcp-relay' ] # -------------------------------- # ISC DHCP Relay configuration # -------------------------------- # .. envvar:: dhcpd_relay_servers # # List of DHCP servers which should receive the relayed packets dhcpd_relay_servers: [ '{{ ansible_default_ipv4.gateway }}' ] # .. envvar:: dhcpd_relay_interfaces # # List of network interfaces that dhcrelay should listen on dhcpd_relay_interfaces: [] # .. envvar:: dhcpd_relay_options # # Additional dhcrelay options dhcpd_relay_options: '{{ "-" + dhcpd_ipversion }}' # --------------------------------- # ISC DHCP Server configuration # --------------------------------- # .. envvar:: dhcpd_server_options # # dhcpd(8) options dhcpd_server_options: '{{ "-" + dhcpd_ipversion }}' # --------------------------- # DHCP main configuration # --------------------------- # .. envvar:: dhcpd_authoritative # # Is this DHCP server authoritative? dhcpd_authoritative: False # .. envvar:: dhcpd_log_facility # # Log facility to use dhcpd_log_facility: 'local7' # .. envvar:: 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: [] # .. envvar:: dhcpd_lease_time # # Max lease time in hours (default lease time is calculated below) dhcpd_lease_time: '24' # .. envvar:: 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 }}' # .. envvar:: 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 # --------------------------- # .. envvar:: 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 # .. envvar:: dhcpd_domain_name # # Default host domain to advertise dhcpd_domain_name: '{{ ansible_domain }}' # .. envvar:: dhcpd_domain_search # # List of additional domains which should be checked when looking for hostnames dhcpd_domain_search: [] # .. envvar:: 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: [] # .. envvar:: dhcpd_options # # Custom global options formatted as a text block dhcpd_options: False # ---------------------------------------- # 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. # .. envvar:: dhcpd_keys # # List of secret keys used for Dynamic DNS configuration. See # :ref:`dhcpd_keys` for more details. dhcpd_keys: [] # .. envvar:: dhcpd_classes # # List of client classes (see dhcpd.conf(5)). More informaction can be found in # :ref:`dhcpd_classes`. dhcpd_classes: [] # .. envvar:: dhcpd_groups # # List of configuration scopes groped together. See :ref:`dhcpd_groups` for # more details. dhcpd_groups: [] # .. envvar:: dhcpd_shared_networks # # List of shared networks grouping specified subnets together. See # :ref:`dhcpd_shared_networks` for more details. dhcpd_shared_networks: [] # .. envvar:: dhcpd_subnets # # List of subnets not in a shared network. See :ref:`dhcpd_subnets` for more # details. dhcpd_subnets: [ '{{ dhcpd_subnet_default[dhcpd_ipversion] }}' ] # 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 }}' comment: 'Generated automatically by Ansible' # .. envvar:: dhcpd_hosts # # Global list of hosts in DHCP. See ref:`dhcpd_hosts` for more details. dhcpd_hosts: [] # List of external files to include. See :ref:`dhcpd_includes` for more # details. dhcpd_includes: [] # .. envvar:: dhcpd_failovers # # DHCP failover configuration. See :ref:`dhcpd_failovers` for more details. dhcpd_failovers: []