provision.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ---
  2. - name: Create the OpenStack resources for cluster installation
  3. hosts: localhost
  4. tasks:
  5. - name: provision cluster
  6. import_role:
  7. name: openshift_openstack
  8. tasks_from: provision.yml
  9. # NOTE(shadower): Bring in the host groups:
  10. - name: evaluate groups
  11. import_playbook: ../../init/evaluate_groups.yml
  12. - name: Wait for the nodes and gather their facts
  13. hosts: oo_all_hosts
  14. become: yes
  15. # NOTE: The nodes may not be up yet, don't gather facts here.
  16. # They'll be collected after `wait_for_connection`.
  17. gather_facts: no
  18. tasks:
  19. - name: Wait for the the nodes to come up
  20. wait_for_connection:
  21. - name: Gather facts for the new nodes
  22. setup:
  23. # TODO(shadower): consider splitting this up so people can stop here
  24. # and configure their DNS if they have to.
  25. - name: Populate the DNS entries
  26. hosts: localhost
  27. tasks:
  28. - name: Populate DNS entries
  29. import_role:
  30. name: openshift_openstack
  31. tasks_from: populate-dns.yml
  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: Optionally subscribe the RHEL nodes
  37. hosts: oo_all_hosts
  38. become: yes
  39. gather_facts: yes
  40. tasks:
  41. - name: Subscribe RHEL instances
  42. import_role:
  43. name: rhel_subscribe
  44. when:
  45. - ansible_distribution == "RedHat"
  46. - rhsub_user is defined
  47. - rhsub_pass is defined
  48. - name: Enable required YUM repositories
  49. import_role:
  50. name: openshift_repos
  51. when:
  52. - ansible_distribution == "RedHat"
  53. - rh_subscribed is defined
  54. - name: Prepare the Nodes in the cluster for installation
  55. hosts: oo_all_hosts
  56. become: yes
  57. gather_facts: yes
  58. tasks:
  59. - name: Install dependencies
  60. import_role:
  61. name: openshift_openstack
  62. tasks_from: node-packages.yml
  63. - name: Configure Node
  64. import_role:
  65. name: openshift_openstack
  66. tasks_from: node-configuration.yml