소스 검색

Beautified generated bird configs and fixed bug in bird role

Till Klocke 9 년 전
부모
커밋
a9a588f4eb
3개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 1
      roles/bird/tasks/main.yml
  2. 3 3
      roles/bird/templates/bird.conf.j2
  3. 3 3
      roles/bird/templates/bird6.conf.j2

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

@@ -14,7 +14,7 @@
   template: src=bird.conf.j2 dest={{bird_config_dir}}/bird.conf
   template: src=bird.conf.j2 dest={{bird_config_dir}}/bird.conf
 
 
 - name: Install bird6.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
 - name: Enable and start bird and bird6
   service: name={{item}} state=started enabled=yes
   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 %}
 {% for template in bird_templates %}
 template {{template.header}} {
 template {{template.header}} {
-        {{template.content}}
+  {{template.content|indent(2,false)}}
 };
 };
 
 
 {% endfor %}
 {% endfor %}
-
 {% for protocol in bird_protocols %}
 {% for protocol in bird_protocols %}
 protocol {{protocol.header}} {
 protocol {{protocol.header}} {
-        {{protocol.content}}
+  {{protocol.content|indent(2,false)}}
 };
 };
+
 {% endfor %}
 {% endfor %}

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

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