ansible-role-sso/templates/shibboleth-attribute-policy...

15 lines
493 B
Django/Jinja

{%- macro xmlnode(node) -%}
<{{node.tag}}{% if node.attributes is defined %}{% for key,value in node.attributes.items() %} {{ key }}="{{ value }}"{% endfor %}{% endif %}{% if node.children is not defined %}/{% endif %}>
{% if node.children is defined %}
{% for child in node.children %}
{{ xmlnode(child) }}
{% endfor %}
{% endif %}
{% if node.children is defined %}
</{{node.tag}}>
{% endif %}
{%- endmacro -%}
{%- for node in saml_attribute_policies %}
{{ xmlnode(node) }}
{% endfor -%}