dns.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. - name: Populate oo_dns_hosts_to_update group
  2. hosts: localhost
  3. connection: local
  4. become: no
  5. gather_facts: no
  6. vars_files:
  7. - vars.yml
  8. - cluster_hosts.yml
  9. tasks:
  10. - name: Evaluate oo_dns_hosts_to_update
  11. add_host:
  12. name: "{{ item }}"
  13. groups: oo_dns_hosts_to_update
  14. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  15. ansible_become: "{{ deployment_vars[deployment_type].become }}"
  16. with_items: "{{ groups[cluster_id ~ '-dns'] }}"
  17. - name: Evaluate oo_hosts_to_add_in_dns
  18. add_host:
  19. name: "{{ item }}"
  20. groups: oo_hosts_to_add_in_dns
  21. ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
  22. ansible_become: "{{ deployment_vars[deployment_type].become }}"
  23. with_items: "{{ groups['tag_clusterid_' ~ cluster_id] }}"
  24. - name: Gather facts
  25. hosts: oo_hosts_to_add_in_dns
  26. vars_files:
  27. - vars.yml
  28. - cluster_hosts.yml
  29. - name: Configure the DNS
  30. hosts: oo_dns_hosts_to_update
  31. vars_files:
  32. - vars.yml
  33. - cluster_hosts.yml
  34. roles:
  35. - role: rhel_subscribe
  36. when: deployment_type in ["enterprise", "atomic-enterprise", "openshift-enterprise"] and
  37. ansible_distribution == "RedHat" and
  38. lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) |
  39. default('no', True) | lower in ['no', 'false']
  40. - { role: dns,
  41. dns_forwarders: "{{ openstack_network_dns }}",
  42. dns_zones: [ novalocal, openstacklocal ],
  43. dns_all_hosts: "{{ g_all_hosts }}" }