Prechádzať zdrojové kódy

Beautified generated bird configs and fixed bug in bird role

Till Klocke 9 rokov pred
rodič
commit
a9a588f4eb

+ 1 - 1
roles/bird/tasks/main.yml

@@ -14,7 +14,7 @@
   template: src=bird.conf.j2 dest={{bird_config_dir}}/bird.conf
 
 - name: Install bird6.conf
-  template: src=bird.conf.j2 dest={{bird_config_dir}}/bird6.conf
+  template: src=bird6.conf.j2 dest={{bird_config_dir}}/bird6.conf
 
 - name: Enable and start bird and bird6
   service: name={{item}} state=started enabled=yes

+ 3 - 3
roles/bird/templates/bird.conf.j2

@@ -3,13 +3,13 @@ router id {{bird_router_id}};
 
 {% for template in bird_templates %}
 template {{template.header}} {
-        {{template.content}}
+  {{template.content|indent(2,false)}}
 };
 
 {% endfor %}
-
 {% for protocol in bird_protocols %}
 protocol {{protocol.header}} {
-        {{protocol.content}}
+  {{protocol.content|indent(2,false)}}
 };
+
 {% endfor %}

+ 3 - 3
roles/bird/templates/bird6.conf.j2

@@ -3,13 +3,13 @@ router id {{bird6_router_id}};
 
 {% for template in bird6_templates %}
 template {{template.header}} {
-        {{template.content}}
+  {{template.content|indent(2,false)}}
 };
 
 {% endfor %}
-
 {% for protocol in bird6_protocols %}
 protocol {{protocol.header}} {
-        {{protocol.content}}
+  {{protocol.content|indent(2,false)}}
 };
+
 {% endfor %}