bind_setup.yml 606 B

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. - name: Install Jinja2
  3. pip:
  4. name: jinja2
  5. - name: Install Bind 9
  6. apt:
  7. name: bind9
  8. - name: Stop the Bind 9 service to run with supervisor
  9. systemd:
  10. name: bind9
  11. state: stopped
  12. enabled: no
  13. - name: remove the startup file
  14. file:
  15. path: /lib/systemd/system/bind9.service
  16. state: absent
  17. - name: Bind9 Config generator
  18. copy:
  19. src: setup_dns_zone
  20. dest: /usr/local/bin/setup_dns_zone
  21. mode: "0755"
  22. - name: Setup bind9 supervisor config
  23. copy:
  24. src: supervisord_bind
  25. dest: /etc/supervisor/conf.d/bind.conf
  26. owner: root
  27. group: root
  28. mode: "0755"