Demacro some more
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
{# ACL Macro. Very easy statement. It's just a list of address match elements. #}
|
{# ACL Macro. Very easy statement. It's just a list of address match elements. #}
|
||||||
{% macro acl(acls) %}
|
{% for acl in item.acl %}
|
||||||
{% for acl in acls %}
|
|
||||||
acl {{ acl.name }} {
|
acl {{ acl.name }} {
|
||||||
{{ functions.simple_item_list(acl.addresses) -}}
|
{{ functions.simple_item_list(acl.addresses) -}}
|
||||||
};
|
};
|
||||||
{% endfor %}{% endmacro %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -9,12 +9,10 @@ options {
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.acl is defined and item.acl %}
|
{% if item.acl is defined and item.acl %}
|
||||||
{% from 'named.conf.acl.j2' import acl with context %}
|
{% include 'named.conf.acl.j2' %}
|
||||||
{{ acl(item.acl) }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.primaries is defined and item.primaries %}
|
{% if item.primaries is defined and item.primaries %}
|
||||||
{% from 'named.conf.primaries.j2' import primaries with context %}
|
{% include 'named.conf.primaries' %}
|
||||||
{{ primaries(item.primaries) }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.controls is defined and item.controls %}
|
{% if item.controls is defined and item.controls %}
|
||||||
{% from 'named.conf.controls.j2' import controls with context %}
|
{% from 'named.conf.controls.j2' import controls with context %}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{% macro primaries(primaries) %}
|
{% for primary in item.primaries if primaries is iterable %}
|
||||||
{% for primary in primaries if primaries is iterable %}
|
|
||||||
primaries {{ primary.name -}}
|
primaries {{ primary.name -}}
|
||||||
{{ (' port ' + primary.port | string) if primary.port is defined and primary.port -}}
|
{{ (' port ' + primary.port | string) if primary.port is defined and primary.port -}}
|
||||||
{{ (' dscp ' + primary.dscp | string) if primary.dscp is defined and primary.dscp }} {
|
{{ (' dscp ' + primary.dscp | string) if primary.dscp is defined and primary.dscp }} {
|
||||||
{{ functions.list_address_port_key_tls(primary.addresses) -}}};
|
{{ functions.list_address_port_key_tls(primary.addresses) -}}};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endmacro %}
|
|
||||||
Reference in New Issue
Block a user