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