make unbound its own role
authorRalf Jung <post@ralfj.de>
Sun, 20 May 2018 20:50:08 +0000 (22:50 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 20 May 2018 20:50:08 +0000 (22:50 +0200)
roles/email/handlers/main.yml
roles/email/tasks/main.yml
roles/unbound/files/dhclient.conf [moved from roles/email/files/unbound/dhclient.conf with 100% similarity]
roles/unbound/files/listen.conf [moved from roles/email/files/unbound/listen.conf with 100% similarity]
roles/unbound/files/unbound.service.override [moved from roles/email/files/unbound/unbound.service.override with 100% similarity]
roles/unbound/tasks/main.yml [moved from roles/email/tasks/unbound.yml with 89% similarity]
site.yml

index b953a16aaa234f2308c03a87246c462f2c9cf4ba..342976ac626369a2986aaddfdfbe56ef6372ae27 100644 (file)
@@ -2,7 +2,5 @@
   service: name=opendkim state=restarted enabled=yes
 - name: postfix
   service: name=postfix state=restarted enabled=yes
   service: name=opendkim state=restarted enabled=yes
 - name: postfix
   service: name=postfix state=restarted enabled=yes
-- name: unbound
-  service: name=unbound state=restarted enabled=yes
 - name: dovecot
   service: name=dovecot state=restarted enabled=yes
 - name: dovecot
   service: name=dovecot state=restarted enabled=yes
index dbe8bb612c63d36a5d6059e4c4b46586758544a7..71d184ce53cb4e6f0e29750adcbebb1d6c5d1196 100644 (file)
@@ -1,6 +1,4 @@
 # daemons
 # daemons
-- import_tasks: unbound.yml
-  tags: unbound
 - import_tasks: opendkim.yml
   tags: opendkim
   when: postfix.opendkim is defined
 - import_tasks: opendkim.yml
   tags: opendkim
   when: postfix.opendkim is defined
similarity index 89%
rename from roles/email/tasks/unbound.yml
rename to roles/unbound/tasks/main.yml
index 0fe643cbfe22a7f85419c76d7c1dada8dab2d99b..c53cecb2312a71025e1a2f8096ab93fed7f3cb91 100644 (file)
@@ -6,14 +6,14 @@
   register: unbound_config
   copy:
     dest: /etc/unbound/unbound.conf.d/listen.conf
   register: unbound_config
   copy:
     dest: /etc/unbound/unbound.conf.d/listen.conf
-    src: files/unbound/listen.conf
+    src: files/listen.conf
 - name: configure systemd (create dir)
   file: path=/etc/systemd/system/unbound.service.d state=directory
 - name: configure systemd (tweak unbound)
   register: unbound_systemd
   copy:
     dest: /etc/systemd/system/unbound.service.d/override.conf
 - name: configure systemd (create dir)
   file: path=/etc/systemd/system/unbound.service.d state=directory
 - name: configure systemd (tweak unbound)
   register: unbound_systemd
   copy:
     dest: /etc/systemd/system/unbound.service.d/override.conf
-    src: files/unbound/unbound.service.override
+    src: files/unbound.service.override
 - name: reload systemd
   when: unbound_systemd.changed
   command: systemctl daemon-reload
 - name: reload systemd
   when: unbound_systemd.changed
   command: systemctl daemon-reload
@@ -29,7 +29,7 @@
   when: dhclient.stat.exists == True
   copy:
     dest: /etc/dhcp/dhclient.conf
   when: dhclient.stat.exists == True
   copy:
     dest: /etc/dhcp/dhclient.conf
-    src: files/unbound/dhclient.conf
+    src: files/dhclient.conf
 - name: configure system DNS
   copy:
     dest: /etc/resolv.conf
 - name: configure system DNS
   copy:
     dest: /etc/resolv.conf
index 32c2a20ead38a9cdd9120e1ba6a0853ca2132f54..74658bfd449820aa4aa44ea7c11826fa5af02238 100644 (file)
--- a/site.yml
+++ b/site.yml
@@ -6,6 +6,12 @@
   - base
   tags: base
 
   - base
   tags: base
 
+- hosts: unbound
+  gather_facts: no
+  roles:
+  - unbound
+  tags: unbound
+
 - hosts: letsencrypt
   gather_facts: no
   roles:
 - hosts: letsencrypt
   gather_facts: no
   roles: