소스 검색

[unbound] Add local zone for Caddy conpat

Colin Powell 4 년 전
부모
커밋
be6e2c0d11
3개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      ansible/roles/unbound/files/service.zones
  2. 1 0
      ansible/roles/unbound/files/unbound.conf
  3. 7 0
      ansible/roles/unbound/tasks/main.yml

+ 3 - 0
ansible/roles/unbound/files/service.zones

@@ -0,0 +1,3 @@
+private-domain: "service."
+local-zone:  "service." static
+local-data: "dns.service"         IN       A        192.168.1.144

+ 1 - 0
ansible/roles/unbound/files/unbound.conf

@@ -26,6 +26,7 @@ server:
 
 	auto-trust-anchor-file: /usr/local/etc/unbound/root.key
 
+    include: /var/unbound/service.zones
 	include: /var/unbound/local-void.zones
 
 

+ 7 - 0
ansible/roles/unbound/tasks/main.yml

@@ -16,6 +16,13 @@
   ignore_errors: true
   notify: Unbound restarted
 
+- name: Unbound service zones file installed
+  copy:
+    src: service.zones
+    dest: /var/unbound/service.zones
+    mode: 0644
+  notify: Unbound restarted
+
 - name: Void zones installed
   shell: void-zones-update.sh
   ignore_errors: true