Fix alignment of templated files

Jinja directives keep indentation. Therefore, if tokens like
`{% for … %}` are indented, the indentation accumulates and this creates
confusing indentation in output.
master
LEdoian 3 years ago
parent f05472259f
commit 2fe2640e9e

@ -18,12 +18,12 @@ protocol ospf v3 {
export all; export all;
}; };
area 0 { area 0 {
{% for br in c.bridges %} {% for br in c.bridges %}
interface "net_{{br.num}}" { interface "net_{{br.num}}" {
cost 10; cost 10;
type broadcast; type broadcast;
}; };
{% endfor %} {% endfor %}
}; };
} }

@ -5,9 +5,9 @@ iface lo inet loopback
auto /eth* auto /eth*
mapping eth* mapping eth*
script TODO/get-mac-address.sh script TODO/get-mac-address.sh
{% for br in c.bridges %} {% for br in c.bridges %}
map 52:54:00:17:{{ '%02x:%02x' % (c.num, br.num) }} net_{{br.num}} map 52:54:00:17:{{ '%02x:%02x' % (c.num, br.num) }} net_{{br.num}}
{% endfor %} {% endfor %}
{% for br in c.bridges %} {% for br in c.bridges %}
iface net_{{br.num}} inet static iface net_{{br.num}} inet static

Loading…
Cancel
Save