瀏覽代碼

Now generating config for service domain in ff community

Till Klocke 9 年之前
父節點
當前提交
af6789f275
共有 2 個文件被更改,包括 9 次插入1 次删除
  1. 4 1
      roles/ff-supernode/tasks/main.yml
  2. 5 0
      roles/ff-supernode/templates/unbound.domain.j2

+ 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 %}