launch.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ---
  2. - name: Launch instance(s)
  3. hosts: localhost
  4. connection: local
  5. become: no
  6. gather_facts: no
  7. vars_files:
  8. - vars.yml
  9. tasks:
  10. - include: ../../common/openshift-cluster/tasks/set_etcd_launch_facts.yml
  11. - include: tasks/launch_instances.yml
  12. vars:
  13. instances: "{{ etcd_names }}"
  14. cluster: "{{ cluster_id }}"
  15. type: "{{ k8s_type }}"
  16. g_sub_host_type: "default"
  17. - include: ../../common/openshift-cluster/tasks/set_master_launch_facts.yml
  18. - include: tasks/launch_instances.yml
  19. vars:
  20. instances: "{{ master_names }}"
  21. cluster: "{{ cluster_id }}"
  22. type: "{{ k8s_type }}"
  23. g_sub_host_type: "default"
  24. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  25. vars:
  26. type: "compute"
  27. count: "{{ num_nodes }}"
  28. - include: tasks/launch_instances.yml
  29. vars:
  30. instances: "{{ node_names }}"
  31. cluster: "{{ cluster_id }}"
  32. type: "{{ k8s_type }}"
  33. g_sub_host_type: "{{ sub_host_type }}"
  34. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  35. vars:
  36. type: "infra"
  37. count: "{{ num_infra }}"
  38. - include: tasks/launch_instances.yml
  39. vars:
  40. instances: "{{ node_names }}"
  41. cluster: "{{ cluster_id }}"
  42. type: "{{ k8s_type }}"
  43. g_sub_host_type: "{{ sub_host_type }}"
  44. - add_host:
  45. name: "{{ master_names.0 }}"
  46. groups: service_master
  47. when: master_names is defined and master_names.0 is defined
  48. - include: update.yml
  49. - include: list.yml