Create template.j2

This commit is contained in:
theNetworkChuck 2019-12-19 10:53:19 -06:00 committed by GitHub
parent ddd905d6d6
commit 0f1a89dae7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

25
template.j2 Normal file
View file

@ -0,0 +1,25 @@
!
hostname {{ siteinfo.sitename }}
!
{% for n in range(3) %}
interface GigabitEthernet0/{{ n+1 }}
{% if n+1 == 1 %}
description Connection to Router
switchport mode trunk
switchport trunk allowed vlan 1,7,9
{% else %}
description Access Port
switchport access vlan 7
switchport voice vlan 9
switchport mode access
{% endif %}}
{% endfor %}
!
interface vlan 7
description Data vlan
ip address {{ siteinfo.vlan7 }}
!
interface vlan 9
description Voice vlan
ip address {{ siteinfo.vlan9 }}
!