main.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ---
  2. - name: Package cache updated
  3. shell: pkg update -f
  4. - name: Unbound installed
  5. pkgng:
  6. name: "unbound void-zones-tools"
  7. state: present
  8. - name: Unbound enabled
  9. shell: sysrc unbound_enable="YES"
  10. - name: Unbound config file installed
  11. copy:
  12. src: unbound.conf
  13. dest: /usr/local/etc/unbound/unbound.conf
  14. owner: root
  15. mode: 0644
  16. ignore_errors: true
  17. notify: Unbound restarted
  18. - name: Void zones installed
  19. shell: void-zones-update.sh
  20. ignore_errors: true
  21. notify: Unbound restarted
  22. - name: Root hints installed
  23. shell: fetch ftp://ftp.internic.net/domain/named.cache -o /usr/local/etc/unbound/root.hints
  24. ignore_errors: true
  25. notify: Unbound restarted
  26. - name: Void zone cronjob configured
  27. cron:
  28. name: "Update void-zones-tools"
  29. special_time: monthly
  30. job: "/usr/local/bin/void-zones-update.sh && /usr/sbin/service unbound restart"
  31. ignore_errors: true
  32. - name: Root hints update cronjob configured
  33. cron:
  34. name: "Update root hints"
  35. special_time: monthly
  36. job: "fetch ftp://ftp.internic.net/domain/named.cache -o /usr/local/etc/unbound/root.hints"
  37. ignore_errors: true