ansible-dhcpd/defaults/main.yml

273 lines
7.3 KiB
YAML
Raw Permalink Normal View History

---
2015-03-28 22:34:25 +00:00
# Default variables
# =================
2015-03-28 22:34:25 +00:00
# .. contents:: Sections
# :local:
#
# -------------------
# General options
# -------------------
# .. envvar:: dhcpd_mode
#
# What service type to configure on this host:
2015-03-28 22:34:25 +00:00
#
# - ``server``: host is an ISC DHCP server, see ``dhcpd(8)``
#
# - ``relay``: host is an ISC DHCP relay, see dhcrelay(8)
#
# - ``probe``: configure only ``dhcp-probe`` when enabled
#
2015-03-28 22:34:25 +00:00
dhcpd_mode: 'server'
# .. envvar:: dhcpd_ipversion
#
# Internet Protocol version to configure: ``4`` or ``6``
dhcpd_ipversion: '4'
2015-03-28 22:34:25 +00:00
# --------------------------------
# ISC DHCP Relay configuration
# --------------------------------
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_relay_servers
#
# List of DHCP servers which should receive the relayed packets
2024-01-13 16:08:19 +00:00
dhcpd_relay_servers: [
'{{ ansible_default_ipv4.gateway
if (ansible_default_ipv4.gateway | d())
else [] }}',
]
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_relay_interfaces
#
# List of network interfaces that dhcrelay should listen on
dhcpd_relay_interfaces: []
2015-03-28 22:34:25 +00:00
# .. 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
# ---------------------------
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_authoritative
#
# Is this DHCP server authoritative?
2024-01-13 16:08:19 +00:00
dhcpd_authoritative: false
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_log_facility
#
# Log facility to use
dhcpd_log_facility: 'local7'
2015-03-28 22:34:25 +00:00
# .. 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
2015-03-28 22:34:25 +00:00
#
# Max lease time in hours (default lease time is calculated below)
dhcpd_lease_time: '24'
# .. envvar:: dhcpd_global_default_lease_time
2015-03-28 22:34:25 +00:00
#
# Default lease time for all IP address leases (18 hours)
2024-01-13 16:08:19 +00:00
dhcpd_global_default_lease_time: '{{ (((dhcpd_lease_time | int / 2) + 6) * 60 * 60) | round | int }}'
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_global_max_lease_time
2015-03-28 22:34:25 +00:00
#
# Maximum lease time for all IP addresses (24 hours)
2024-01-13 16:08:19 +00:00
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.
2024-01-13 16:08:19 +00:00
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
2015-03-28 22:34:25 +00:00
#
# List of nameservers to advertise by default
# If it's not specified, nameservers from ``/etc/resolv.conf`` will be used
# instead.
dhcpd_nameservers: []
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_options
#
# Custom global options formatted as a text block
2024-01-13 16:08:19 +00:00
dhcpd_options: false
2015-04-22 08:55:47 +00:00
# ----------------
# iPXE support
# ----------------
# .. envvar:: dhcpd_ipxe
#
# Add iPXE-specific options to ISC DHCP server configuration.
2024-01-13 16:08:19 +00:00
dhcpd_ipxe: false
2015-04-22 08:55:47 +00:00
# .. envvar:: dhcpd_ipxe_dhcp_space
#
# Add DHCP options iPXE namespace in ``dhcpd.conf`` required to support
# iPXE-specific DHCP options in the DHCP server configuration.
2024-01-13 16:08:19 +00:00
dhcpd_ipxe_dhcp_space: true
2015-04-22 08:55:47 +00:00
# .. envvar:: 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'
# .. envvar:: dhcpd_ipxe_filename
#
# File sent to hosts booted with iPXE, by default load the standard menu file.
dhcpd_ipxe_filename: 'menu.ipxe'
# .. envvar:: dhcpd_ipxe_options
#
# Additional DHCP options in a YAML text block format, added in the iPXE
# section of the configuration.
dhcpd_ipxe_options: ''
2015-03-28 22:34:25 +00:00
# ----------------------------------------
# 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
2015-03-28 22:34:25 +00:00
# expansion.
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_keys
#
# List of secret keys used for Dynamic DNS configuration. See
# :ref:`dhcpd_keys` for more details.
2014-12-18 13:10:12 +00:00
dhcpd_keys: []
2015-03-30 11:58:19 +00:00
# .. envvar:: dhcpd_zones
#
# List of DNS zones to update with Dynamic DNS configuration. See
# :ref:`dhcpd_zones` for more details.
dhcpd_zones: []
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_classes
#
# List of client classes (see dhcpd.conf(5)). More informaction can be found in
# :ref:`dhcpd_classes`.
dhcpd_classes: []
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_groups
#
# List of configuration scopes groped together. See :ref:`dhcpd_groups` for
# more details.
dhcpd_groups: []
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_shared_networks
#
# List of shared networks grouping specified subnets together. See
# :ref:`dhcpd_shared_networks` for more details.
dhcpd_shared_networks: []
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_subnets
#
2015-03-28 22:34:25 +00:00
# List of subnets not in a shared network. See :ref:`dhcpd_subnets` for more
# details.
2024-01-13 16:08:19 +00:00
dhcpd_subnets: ['{{ dhcpd_subnet_default[dhcpd_ipversion] }}']
2015-03-28 22:34:25 +00:00
# Default subnet managed automatically
dhcpd_subnet_default:
2024-01-13 16:08:19 +00:00
'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'
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_hosts
#
# Global list of hosts in DHCP. See ref:`dhcpd_hosts` for more details.
dhcpd_hosts: []
2015-03-28 22:34:25 +00:00
# List of external files to include. See :ref:`dhcpd_includes` for more
# details.
dhcpd_includes: []
2015-03-28 22:34:25 +00:00
# .. envvar:: dhcpd_failovers
2014-11-28 09:54:28 +00:00
#
2015-03-28 22:34:25 +00:00
# DHCP failover configuration. See :ref:`dhcpd_failovers` for more details.
2014-11-28 09:54:28 +00:00
dhcpd_failovers: []
2014-11-28 10:00:19 +00:00
# -----------------------------
# dhcp-probe configuration
# -----------------------------
# .. envvar:: dhcpd_probe
#
# Enable or disable ``dhcp-probe`` script
2024-01-13 16:08:19 +00:00
dhcpd_probe: false
# .. envvar:: dhcpd_probe_mail_to
#
# List of mail recipients which will receive messages about unauthorized DHCP
# servers. Set to ``[]`` to disable.
2024-01-13 16:08:19 +00:00
dhcpd_probe_mail_to: ['root@{{ ansible_domain }}']
# .. envvar:: dhcpd_probe_page_to
#
# Alternative list of mail recipients which will receive mail messages. Meant
# to be used as a "pager service", you can use ``debops.smstools`` role to
# setup a mail-SMS gateway and send the SMS messages that way.
dhcpd_probe_page_to: []
# .. envvar:: dhcpd_probe_mail_timeout
#
# Number of seconds between to wait between sending new mail messages
dhcpd_probe_mail_timeout: '{{ (20 * 60) }}'
# .. envvar:: dhcpd_probe_page_timeout
#
# Number of seconds between to wait between sending new pager messages
dhcpd_probe_page_timeout: '{{ (20 * 60) }}'
# .. envvar:: dhcpd_probe_legal_servers
#
# List of IP addresses of the host which are authorized DHCP servers.
dhcpd_probe_legal_servers: []
# .. envvar:: dhcpd_probe_options
#
# Additional ``dhcp-probe`` options specified as a YAML text block.
dhcpd_probe_options: ''