Skip to content

Instantly share code, notes, and snippets.

@remoteur
Last active August 29, 2015 14:18
Show Gist options
  • Save remoteur/5cd291f364ce422e5797 to your computer and use it in GitHub Desktop.
Save remoteur/5cd291f364ce422e5797 to your computer and use it in GitHub Desktop.
OSPF Lab Jinja template
config.j2
{% for iface in item.int %}
interface {{ iface.name }}
no shutdown
ip address {{ iface.address }} {{ iface.netmask }}
{% endfor %}
router ospf 1
{% for iface in item.int %}
{% if iface.ospf == "yes" %}
network {{ iface.address }} 0.0.0.0 area 0
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment