{% for p in ports|ports %}
interface gigabitEthernet {{ p }}
{% if description %}
description {{ description }}
{% endif %}
switchport general allowed vlan {{ vlan_id }} untagged
switchport pvid {{ vlan_id }}
exit
{% endfor %}
