Role service-dhcpd: add Option 43

provide UniFi Controller IP via Option 43
This commit is contained in:
Julian Labus 2019-08-22 21:26:11 +02:00
parent ca2939dedb
commit d344f3045c
No known key found for this signature in database
GPG Key ID: 8AF209F2C6B3572A
1 changed files with 38 additions and 0 deletions

View File

@ -34,6 +34,44 @@
"unwarned-reclaim-cycles": {{ kea_expired_leases_processing['unwarned_reclaim_cycles'] }}
},
"valid-lifetime": {{ kea_lease_time }},
"option-def": [
{
"name": "unifi-address",
"code": 1,
"type": "ipv4-address",
"space": "ubnt"
}
],
{% if unifi_server is defined %}
"client-classes": [
{
"name": "ubnt",
"test": "substring(option[vendor-class-identifier].text, 0, 4) == 'ubnt'",
"option-def": [
{
"name": "vendor-encapsulated-options",
"code": 43,
"type": "empty",
"encapsulate": "ubnt"
}
],
"option-data": [
{
"name": "vendor-class-identifier",
"data": "ubnt"
},
{
"name": "unifi-address",
"space": "ubnt",
"data": "{{ loopback_net_ipv4 | ipaddr(hostvars[unifi_server + '.' + http_domain_external ]['magic']) | ipaddr('address') }}"
},
{
"name": "vendor-encapsulated-options"
}
]
}
],
{% endif %}
"subnet4": [
{% for mesh in meshes %}
{