Kaynağa Gözat

Now generating config for service domain in ff community

Till Klocke 9 yıl önce
ebeveyn
işleme
af6789f275

+ 4 - 1
roles/ff-supernode/tasks/main.yml

@@ -22,4 +22,7 @@
   notify: Restart supervisor
 
 - name: Install ntp.conf
-  template: src=ntp.conf.j2 dest=/etc/ntp.conf
+  template: src=ntp.conf.j2 dest=/etc/ntp.conf
+
+- name: Install unbound domain config
+  template: src=unbound.domain.j2 dest=/etc/unbound/conf.d/supernode.conf

+ 5 - 0
roles/ff-supernode/templates/unbound.domain.j2

@@ -0,0 +1,5 @@
+local-zone: "services.{{supernode_top_domain}}." static
+{% for backbone in supernodes %}
+local-data: "{{loop.index}}.ntp.services.{{supernode_top_domain}}. A {{backbone.mesh_ip_v4|ipaddr('address')}}"
+local-data: "{{loop.index}}.ntp.services.{{supernode_top_domain}}. AAAA {{backbone.mesh_ip_v6|ipaddr('address')}}""
+{% endfor %}