add jinja files
This commit is contained in:
19
TP_03/templates/vlan_router.j2
Normal file
19
TP_03/templates/vlan_router.j2
Normal file
@@ -0,0 +1,19 @@
|
||||
{%- for interface in interfaces %}
|
||||
{%- if "g2/0" == interface.name %}
|
||||
interface {{ interface.name }}
|
||||
no shutdown
|
||||
exit
|
||||
|
||||
{%- elif "3/0" == interface.name %}
|
||||
interface {{ interface.name }}
|
||||
no shutdown
|
||||
exit
|
||||
|
||||
{%- else %}
|
||||
interface {{ interface.name }}
|
||||
encapsulation dot1Q {{interface.vlan_id}}
|
||||
description "{{ interface.description | default("**NO DESCRIPTION**") }}"
|
||||
ip address {{ interface.ip }} {{ interface.mask }}
|
||||
exit
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
Reference in New Issue
Block a user