QuestionQ88
VerifiedNetwork Automation FoundationAn engineer needs to generate access-port interface configurations from inventory with a Jinja2 template. The engineer must use loops, a shutdown-state conditional, and filters that supply sensible defaults for missing descriptions. Drag the code snippets into the boxes to construct the artifact. Not every option is used.
Drag & Drop
{%- for iface in %} interface {{ iface.name }} description {{ iface. | ('UNSET') }} switchport mode access switchport access vlan {{ iface. }} {% if iface.shutdown %}shutdown{% else %}no shutdown{% endif %} ! {%- endfor %}
Community Discussion