2014-08-26 21:36:08 +00:00
|
|
|
---
|
2015-03-28 22:34:25 +00:00
|
|
|
# Default variables
|
|
|
|
# =================
|
2014-08-26 21:36:08 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
# .. contents:: Sections
|
|
|
|
# :local:
|
|
|
|
#
|
|
|
|
# -------------------
|
|
|
|
# General options
|
|
|
|
# -------------------
|
|
|
|
|
|
|
|
# .. envvar:: dhcpd_mode
|
|
|
|
#
|
2015-03-27 13:32:44 +00:00
|
|
|
# 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)
|
|
|
|
#
|
2015-03-30 11:34:53 +00:00
|
|
|
# - ``probe``: configure only ``dhcp-probe`` when enabled
|
|
|
|
#
|
2015-03-28 22:34:25 +00:00
|
|
|
dhcpd_mode: 'server'
|
|
|
|
|
2015-03-27 13:32:44 +00:00
|
|
|
|
2015-03-29 19:11:40 +00:00
|
|
|
# .. envvar:: dhcpd_ipversion
|
|
|
|
#
|
|
|
|
# Internet Protocol version to configure: ``4`` or ``6``
|
|
|
|
dhcpd_ipversion: '4'
|
|
|
|
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
# .. envvar:: dhcpd_base_packages_map
|
|
|
|
#
|
2015-03-27 13:32:44 +00:00
|
|
|
# What packages should be installed, depending on mode of operation
|
|
|
|
dhcpd_base_packages_map:
|
|
|
|
'server': [ 'isc-dhcp-server' ]
|
|
|
|
'relay': [ 'isc-dhcp-relay' ]
|
2015-03-30 11:34:53 +00:00
|
|
|
'probe': []
|
2015-03-27 13:32:44 +00:00
|
|
|
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
# --------------------------------
|
|
|
|
# ISC DHCP Relay configuration
|
|
|
|
# --------------------------------
|
2015-03-27 13:32:44 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
# .. envvar:: dhcpd_relay_servers
|
|
|
|
#
|
2015-03-27 13:32:44 +00:00
|
|
|
# List of DHCP servers which should receive the relayed packets
|
|
|
|
dhcpd_relay_servers: [ '{{ ansible_default_ipv4.gateway }}' ]
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
|
|
|
# .. envvar:: dhcpd_relay_interfaces
|
|
|
|
#
|
2015-03-27 13:32:44 +00:00
|
|
|
# List of network interfaces that dhcrelay should listen on
|
|
|
|
dhcpd_relay_interfaces: []
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
|
|
|
# .. envvar:: dhcpd_relay_options
|
|
|
|
#
|
2015-03-27 13:32:44 +00:00
|
|
|
# Additional dhcrelay options
|
2015-03-29 19:11:40 +00:00
|
|
|
dhcpd_relay_options: '{{ "-" + dhcpd_ipversion }}'
|
2015-03-27 13:32:44 +00:00
|
|
|
|
|
|
|
|
2015-03-28 23:25:58 +00:00
|
|
|
# ---------------------------------
|
|
|
|
# ISC DHCP Server configuration
|
|
|
|
# ---------------------------------
|
|
|
|
|
|
|
|
# .. envvar:: dhcpd_server_options
|
|
|
|
#
|
|
|
|
# dhcpd(8) options
|
2015-03-29 19:11:40 +00:00
|
|
|
dhcpd_server_options: '{{ "-" + dhcpd_ipversion }}'
|
2015-03-28 23:25:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------
|
|
|
|
# DHCP main configuration
|
|
|
|
# ---------------------------
|
2014-08-26 21:36:08 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
# .. envvar:: dhcpd_authoritative
|
|
|
|
#
|
2014-08-26 21:36:08 +00:00
|
|
|
# Is this DHCP server authoritative?
|
|
|
|
dhcpd_authoritative: False
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
2015-03-29 20:56:46 +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
|
|
|
|
#
|
2014-08-26 21:36:08 +00:00
|
|
|
# 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: []
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
2015-03-29 20:56:46 +00:00
|
|
|
# .. envvar:: dhcpd_lease_time
|
2015-03-28 22:34:25 +00:00
|
|
|
#
|
2015-03-29 20:56:46 +00:00
|
|
|
# Max lease time in hours (default lease time is calculated below)
|
|
|
|
dhcpd_lease_time: '24'
|
2014-08-26 21:36:08 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
2015-03-29 20:56:46 +00:00
|
|
|
# .. envvar:: dhcpd_global_default_lease_time
|
2015-03-28 22:34:25 +00:00
|
|
|
#
|
2015-03-29 20:56:46 +00:00
|
|
|
# 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 }}'
|
2014-08-26 21:36:08 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
2015-03-29 20:56:46 +00:00
|
|
|
# .. envvar:: dhcpd_global_max_lease_time
|
2015-03-28 22:34:25 +00:00
|
|
|
#
|
2015-03-29 20:56:46 +00:00
|
|
|
# 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: []
|
2014-08-26 21:36:08 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
2015-03-29 20:56:46 +00:00
|
|
|
# .. envvar:: dhcpd_nameservers
|
2015-03-28 22:34:25 +00:00
|
|
|
#
|
2015-03-29 20:56:46 +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: []
|
2014-08-26 21:36:08 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
|
|
|
# .. envvar:: dhcpd_options
|
|
|
|
#
|
2015-03-29 20:56:46 +00:00
|
|
|
# Custom global options formatted as a text block
|
2014-08-26 21:36:08 +00:00
|
|
|
dhcpd_options: False
|
|
|
|
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
# ----------------------------------------
|
|
|
|
# ISC DHCP Server configuration scopes
|
|
|
|
# ----------------------------------------
|
2014-08-26 21:36:08 +00:00
|
|
|
|
|
|
|
# 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.
|
2014-08-26 21:36:08 +00:00
|
|
|
|
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: []
|
2014-08-26 21:36:08 +00:00
|
|
|
|
|
|
|
|
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: []
|
2014-08-26 21:36:08 +00:00
|
|
|
|
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
# .. envvar:: dhcpd_groups
|
|
|
|
#
|
|
|
|
# List of configuration scopes groped together. See :ref:`dhcpd_groups` for
|
|
|
|
# more details.
|
2014-08-26 21:36:08 +00:00
|
|
|
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.
|
2014-08-26 21:36:08 +00:00
|
|
|
dhcpd_shared_networks: []
|
2015-03-28 22:34:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
# .. envvar:: dhcpd_subnets
|
2014-08-26 21:36:08 +00:00
|
|
|
#
|
2015-03-28 22:34:25 +00:00
|
|
|
# List of subnets not in a shared network. See :ref:`dhcpd_subnets` for more
|
|
|
|
# details.
|
2015-03-29 19:11:40 +00:00
|
|
|
dhcpd_subnets: [ '{{ dhcpd_subnet_default[dhcpd_ipversion] }}' ]
|
2015-03-28 22:34:25 +00:00
|
|
|
|
|
|
|
# Default subnet managed automatically
|
|
|
|
dhcpd_subnet_default:
|
2015-03-29 19:11:40 +00:00
|
|
|
'4':
|
|
|
|
subnet: '{{ ansible_default_ipv4.network + "/" + ansible_default_ipv4.netmask }}'
|
2015-03-29 21:34:58 +00:00
|
|
|
routers: '{{ ansible_default_ipv4.gateway | default("") }}'
|
2015-03-29 19:11:40 +00:00
|
|
|
comment: 'Generated automatically by Ansible'
|
|
|
|
'6':
|
|
|
|
subnet: '{{ ansible_default_ipv6.address + "/" + ansible_default_ipv6.prefix }}'
|
|
|
|
comment: 'Generated automatically by Ansible'
|
2014-08-26 21:36:08 +00:00
|
|
|
|
|
|
|
|
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: []
|
2014-08-26 21:36:08 +00:00
|
|
|
|
2015-03-28 22:34:25 +00:00
|
|
|
|
|
|
|
# List of external files to include. See :ref:`dhcpd_includes` for more
|
|
|
|
# details.
|
2014-08-26 21:36:08 +00:00
|
|
|
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
|
|
|
|
2015-03-30 11:34:53 +00:00
|
|
|
|
|
|
|
# -----------------------------
|
|
|
|
# dhcp-probe configuration
|
|
|
|
# -----------------------------
|
|
|
|
|
|
|
|
# .. envvar:: dhcpd_probe
|
|
|
|
#
|
|
|
|
# Enable or disable ``dhcp-probe`` script
|
|
|
|
dhcpd_probe: True
|
|
|
|
|
|
|
|
|
|
|
|
# .. envvar:: dhcpd_probe_mail_to
|
|
|
|
#
|
|
|
|
# List of mail recipients which will receive messages about unauthorized DHCP
|
|
|
|
# servers. Set to ``[]`` to disable.
|
|
|
|
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: ''
|
|
|
|
|