main.yml 535 B

12345678910111213141516171819202122
  1. - name: Install Bind
  2. action: "{{ ansible_pkg_mgr }} name=bind"
  3. - name: Configure Bind
  4. template:
  5. src: "{{ item.src }}"
  6. dest: "{{ item.dest }}"
  7. validate: "{{ item.validate }}"
  8. with_items:
  9. - src: openshift-cluster.zone
  10. dest: /var/named/openshift-cluster.zone
  11. validate: "named-checkzone {{ dns_zones[0] }} %s"
  12. - src: named.conf
  13. dest: /etc/named.conf
  14. validate: "named-checkconf %s"
  15. notify: restart bind
  16. - name: Enable Bind
  17. service:
  18. name: named
  19. state: started
  20. enabled: yes