roles/radvd: Support multiple prefixes per network
It is occasionally necessary to advertise multiple prefixes on the same interface, particularly when those prefixes are not on-link. The *radvd* role thus now expects each item in `radvd_interfaces` list to have a `prefixes` property, which itself is a list of prefixes to advertise. Prefixes can specify properties such as `on_link`, `autonomous`, `preferred_lifetime`, etc.jenkins-master
parent
b83e832df9
commit
2d5a614633
|
@ -5,11 +5,19 @@ interface {{ iface.interface }}
|
||||||
{% if iface.other_config|d(False) %}
|
{% if iface.other_config|d(False) %}
|
||||||
AdvOtherConfigFlag on;
|
AdvOtherConfigFlag on;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% for prefix in iface.prefixes %}
|
||||||
|
|
||||||
prefix {{ iface.prefix }} {
|
prefix {{ prefix.prefix }} {
|
||||||
AdvOnLink {% if iface.on_link|d(True) %}on{% else %}off{% endif %};
|
AdvOnLink {% if prefix.on_link|d(True) %}on{% else %}off{% endif %};
|
||||||
AdvAutonomous {% if iface.autonomous|d(True) %}on{% else %}off{% endif %};
|
AdvAutonomous {% if prefix.autonomous|d(True) %}on{% else %}off{% endif %};
|
||||||
|
{% if prefix.valid_lifetime is defined %}
|
||||||
|
AdvValidLifetime {{ prefix.valid_lifetime }};
|
||||||
|
{% endif %}
|
||||||
|
{% if prefix.preferred_lifetime is defined %}
|
||||||
|
AdvPreferredLifetime {{ prefix.preferred_lifetime }};
|
||||||
|
{% endif %}
|
||||||
};
|
};
|
||||||
|
{% endfor %}
|
||||||
{% if iface.rdnss is defined %}
|
{% if iface.rdnss is defined %}
|
||||||
{% for address in iface.rdnss %}
|
{% for address in iface.rdnss %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue