feat: initial commit

This commit is contained in:
Simon Cornet 2025-07-15 15:14:25 +02:00
commit f17a0eeddf
17 changed files with 273 additions and 93 deletions

View 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 %}
]
}
}