simple.txt.j2
341 Bytes
{% for d in ldaptree.hirarchy -%}
{{ '--'*d[0] }} dn: {{ d[2] }}
{% for k in ldaptree.node(d[2]).keys() -%}
{% if ldaptree.node(d[2]) is string -%}
{{ ' '*d[0] }} {{ k }}: {{ ldaptree.node(d[2])[k] }}
{% else -%}
{% for v in ldaptree.node(d[2])[k] -%}
{{ ' '*d[0] }} {{ k }}: {{ v }}
{% endfor -%}
{% endif -%}
{% endfor -%}
{% endfor -%}