add jinja files

This commit is contained in:
amar kantas
2023-04-19 14:29:23 +02:00
parent 44fb59af52
commit 2a564bba38
3 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{% for vlan in vlans %}
vlan {{vlan.id}}
name {{vlan.name}}
exit
{%- endfor %}
{% for interface in interfaces %}
{% if 'trunk' == interface.mode %}
interface {{ interface.name }}
switchport mode {{interface.mode}}
switchport {{interface.mode}} allowed vlan {{interface.allowed_vlan}}
exit
{%- else %}
interface {{ interface.name }}
switchport mode {{interface.mode}}
switchport {{interface.mode}} vlan {{interface.vlan_id}}
description "{{ interface.description | default("**NO DESCRIPTION**") }}"
exit
{%- endif -%}
{%- endfor -%}