Skip to content

Instantly share code, notes, and snippets.

@bassdread
Created May 16, 2011 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bassdread/974446 to your computer and use it in GitHub Desktop.
Save bassdread/974446 to your computer and use it in GitHub Desktop.
jinja2 issue
{% for interface in interfaces %}
{% if interface['auto-up'] is defined %}{% if interface['auto-up'] in ('yes', 'true', 'on') %}auto {{ interface.name }}{% endif %}{% endif %}
iface {{ interface.name }} inet {{ interface.type }}
{% if interface.address is defined %} address {{ interface.address }}{% endif %}
{% if interface.gateway is defined %} gateway {{ interface.gateway }}{%- endif -%}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment