feat: initial commit
This commit is contained in:
parent
c03c6cd336
commit
f17a0eeddf
17 changed files with 273 additions and 93 deletions
47
templates/kea-dhcp4.conf.j2
Normal file
47
templates/kea-dhcp4.conf.j2
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"Dhcp4": {
|
||||
"interfaces-config": {
|
||||
"interfaces": [ "{{ kea_dhcp_interface }}" ]
|
||||
},
|
||||
"lease-database": {
|
||||
"type": "memfile",
|
||||
"persist": true,
|
||||
"name": "/var/lib/kea/dhcp4.leases"
|
||||
},
|
||||
"valid-lifetime": {{ kea_dhcp_lease_lifetime }},
|
||||
"renew-timer": {{ kea_dhcp_lease_renew }},
|
||||
"rebind-timer": {{ kea_dhcp_lease_rebind }},
|
||||
"subnet4": [
|
||||
{% for subnet in dhcp_subnets %}
|
||||
{
|
||||
"subnet": "{{ subnet.subnet }}",
|
||||
"pools": [
|
||||
{
|
||||
"pool": "{{ subnet.pool }}"
|
||||
}
|
||||
],
|
||||
"option-data": [
|
||||
{
|
||||
"name": "routers",
|
||||
"data": "{{ subnet.gateway }}"
|
||||
},
|
||||
{
|
||||
"name": "domain-name-servers",
|
||||
"data": "{{ subnet.dns }}"
|
||||
}
|
||||
]{% if subnet.reservations is defined and subnet.reservations | length > 0 %},
|
||||
"reservations": [
|
||||
{% for reservation in subnet.reservations %}
|
||||
{
|
||||
"hw-address": "{{ reservation.mac }}",
|
||||
"ip-address": "{{ reservation.ip }}",
|
||||
"hostname": "{{ reservation.hostname }}"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue