provision.yml 1.5 KB

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