Added support for key statements
This commit is contained in:
parent
0d378f8441
commit
fac5b82f55
@ -78,6 +78,10 @@ dhcpd_options: False
|
||||
# - address: '' IP address reserved for that host, optional
|
||||
# - ethernet: '' Ethernet MAC address of this host, optional
|
||||
|
||||
dhcpd_keys: []
|
||||
#- key: "secure-key"
|
||||
# algorithm: "hmac-md5"
|
||||
# secret: "JFw7jM2/KVU2hIB4xkDSQmHB6JJOLUu4xkzwLNNpR88="
|
||||
|
||||
# List of classes
|
||||
dhcpd_classes: []
|
||||
|
@ -178,6 +178,15 @@ failover peer "{{ failover.failover }}" {
|
||||
{% endif %}
|
||||
}
|
||||
{% endmacro %}
|
||||
{% macro print_key(key) %}
|
||||
{% if key.comment is defined and key.comment %}
|
||||
# {{ key.comment }}
|
||||
{% endif %}
|
||||
key "{{ key.key }}" {
|
||||
algorithm {{ key.algorithm|default('hmac-md5') }};
|
||||
secret {{ key.secret }};
|
||||
}
|
||||
{% endmacro %}
|
||||
|
||||
{% if dhcpd_authoritative is defined and dhcpd_authoritative %}
|
||||
authoritative;
|
||||
@ -195,6 +204,11 @@ not authoritative;
|
||||
# Configuration options
|
||||
{{ dhcpd_options }}
|
||||
|
||||
{% endif %}
|
||||
{% if dhcpd_keys is defined and dhcpd_keys %}
|
||||
{% for key in dhcpd_keys %}
|
||||
{{ print_key(key) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if dhcpd_classes is defined and dhcpd_classes %}
|
||||
{% for class in dhcpd_classes %}
|
||||
|
Loading…
Reference in New Issue
Block a user