provision.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ---
  2. - name: Create the OpenStack resources for cluster installation
  3. import_playbook: provision_resources.yml
  4. - name: Evaluate OpenStack groups from the dynamic inventory
  5. import_playbook: evaluate_groups.yml
  6. - name: Evaluate remaining cluster groups
  7. import_playbook: ../../init/evaluate_groups.yml
  8. - name: Wait for the nodes and gather their facts
  9. any_errors_fatal: true
  10. hosts: oo_all_hosts
  11. become: yes
  12. # NOTE: The nodes may not be up yet, don't gather facts here.
  13. # They'll be collected after `wait_for_connection`.
  14. gather_facts: no
  15. tasks:
  16. - name: Wait for the nodes to come up
  17. wait_for_connection:
  18. - name: Gather facts for the new nodes
  19. setup:
  20. # TODO(shadower): consider splitting this up so people can stop here
  21. # and configure their DNS if they have to.
  22. - name: Populate the DNS entries
  23. any_errors_fatal: true
  24. hosts: localhost
  25. tasks:
  26. - name: Add the DNS records
  27. import_role:
  28. name: openshift_openstack
  29. tasks_from: populate-dns.yml
  30. vars:
  31. l_openshift_openstack_dns_update_nodes: "{{ groups.OSEv3 }}"
  32. when:
  33. - openshift_openstack_external_nsupdate_keys is defined
  34. - openshift_openstack_external_nsupdate_keys.private is defined or openshift_openstack_external_nsupdate_keys.public is defined
  35. - import_playbook: ../../init/basic_facts.yml
  36. - name: Run the init
  37. import_playbook: ../../init/main.yml
  38. - name: Optionally subscribe the RHEL nodes
  39. any_errors_fatal: true
  40. hosts: oo_all_hosts
  41. become: yes
  42. gather_facts: yes
  43. tasks:
  44. - name: Subscribe RHEL instances
  45. import_role:
  46. name: rhel_subscribe
  47. when:
  48. - ansible_distribution == "RedHat"
  49. - (rhsub_user is defined and rhsub_pass is defined) or (rhsub_ak is defined and rhsub_orgid is defined)
  50. - name: Configuring proper repositories
  51. import_role:
  52. name: openshift_repos
  53. when:
  54. - ansible_distribution == "RedHat"
  55. - (rhsub_user is defined and rhsub_pass is defined) or (rhsub_ak is defined and rhsub_orgid is defined)
  56. - name: Show information about the deployed cluster
  57. import_playbook: cluster-info.yml