kayobe/ansible/roles/dell-switch/templates/dellos9-config.j2

36 lines
827 B
Django/Jinja

#jinja2: trim_blocks: True,lstrip_blocks: True
{% for line in dell_switch_config %}
{{ line }}
{% endfor %}
{# Configure all ethernet interfaces first, then configure VLAN interfaces #}
{# which may depend on them. #}
{% for interface, config in
dell_switch_interface_config.items() %}
{% if 'vlan' not in interface %}
interface {{ interface }}
{% if config.description is defined %}
description {{ config.description }}
{% endif %}
{% for line in config.config %}
{{ line }}
{% endfor %}
exit
{% endif %}
{% endfor %}
{% for interface, config in dell_switch_interface_config.items() %}
{% if 'vlan' in interface %}
interface {{ interface }}
{% if config.description is defined %}
description {{ config.description }}
{% endif %}
{% for line in config.config %}
{{ line }}
{% endfor %}
exit
{% endif %}
{% endfor %}