{% for p in ports|ports %}
interface {{ p }}
{% if encap %}
switchport trunk encapsulation dot1q
{% endif %}
switchport mode trunk
switchport trunk allowed vlan {{ allowed_vlans|vlanlist }}
{% if native_vlan %}
switchport trunk native vlan {{ native_vlan }}
{% endif %}
exit
{% endfor %}
