forked from mrlesmithjr/ansible-kea-dhcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
82 lines (82 loc) · 2.68 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
- hosts: dhcp_servers
gather_facts: true
vars:
kea_dhcp_config: true
kea_dhcp_dhcp4_config:
Dhcp4:
renew-timer: 1000
rebind-timer: 2000
# Add names of interfaces to listen on
interfaces-config:
interfaces:
- "*"
# - eth0
# - eth1
dhcp-socket-type: raw
# Use Memfile lease database backend to store leases in a CSV file.
lease-database:
type: memfile
persist: true
lfc-interval: 0
# Setup reclamation of the expired leases and leases affinity.
expired-leases-processing:
reclaim-timer-wait-time: 10
flush-reclaimed-timer-wait-time: 25
hold-reclaimed-time: 3600
max-reclaim-leases: 100
max-reclaim-time: 250
unwarned-reclaim-cycles: 5
# Global (inherited by all subnets) lease lifetime is mandatory parameter.
valid-lifetime: 4000
# Below an example of the simple subnet declarations
subnet4:
- subnet: 192.0.2.0/24
next-server: 192.0.2.234
pools:
- pool: 192.0.2.1 - 192.0.2.200
reservations:
- hw-address: "1a:1b:1c:1d:1e:1f"
ip-address: 192.0.2.202
- subnet: 192.0.3.0/24
pools:
- pool: 192.0.3.1 - 192.0.3.200
relay:
ip-address: 10.0.0.1
- subnet: 192.0.4.0/24
pools:
- pool: 192.0.4.1 - 192.0.4.200
option-data:
- name: domain-name-servers
data: 8.8.8.8, 8.8.4.4
- name: domain-name
data: "{{ kea_dhcp_pri_domain_name }}"
- name: tftp-server-name
data: "tftp.{{ kea_dhcp_pri_domain_name }}"
- name: boot-file-name
data: pxelinux.0
dhcp-ddns:
enable-updates: false
qualifying-suffix: "{{ kea_dhcp_pri_domain_name }}"
# next-server: 0.0.0.0
control-socket:
socket-type: unix
socket-name: /var/run/kea.socket
# Logging configuration starts here. It tells Kea servers to store
# all log messages (on severity INFO or more) in a file.
# debuglevel variable is used on DEBUG level only.
Logging:
loggers:
- name: kea-dhcp4
output_options:
- output: /var/log/kea-dhcp4.log
severity: INFO
debuglevel: 0
pri_domain_name: test.vagrant.local
tasks:
- name: Include ansible-bootstrap-python
include_role:
name: ansible-bootstrap-python
- name: Include ansible-kea-dhcp
include_role:
name: ansible-kea-dhcp