launch.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. - ["vars.{{ deployment_type }}.{{ cluster_id }}.yml", vars.defaults.yml]
  10. tasks:
  11. - fail:
  12. msg: Deployment type not supported for aws provider yet
  13. when: deployment_type == 'enterprise'
  14. - include: ../../common/openshift-cluster/tasks/set_etcd_launch_facts.yml
  15. - include: tasks/launch_instances.yml
  16. vars:
  17. instances: "{{ etcd_names }}"
  18. cluster: "{{ cluster_id }}"
  19. type: "{{ k8s_type }}"
  20. g_sub_host_type: "default"
  21. - include: ../../common/openshift-cluster/tasks/set_master_launch_facts.yml
  22. - include: tasks/launch_instances.yml
  23. vars:
  24. instances: "{{ master_names }}"
  25. cluster: "{{ cluster_id }}"
  26. type: "{{ k8s_type }}"
  27. g_sub_host_type: "default"
  28. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  29. vars:
  30. type: "compute"
  31. count: "{{ num_nodes }}"
  32. - include: tasks/launch_instances.yml
  33. vars:
  34. instances: "{{ node_names }}"
  35. cluster: "{{ cluster_id }}"
  36. type: "{{ k8s_type }}"
  37. g_sub_host_type: "{{ sub_host_type }}"
  38. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  39. vars:
  40. type: "infra"
  41. count: "{{ num_infra }}"
  42. - include: tasks/launch_instances.yml
  43. vars:
  44. instances: "{{ node_names }}"
  45. cluster: "{{ cluster_id }}"
  46. type: "{{ k8s_type }}"
  47. g_sub_host_type: "{{ sub_host_type }}"
  48. - add_host:
  49. name: "{{ master_names.0 }}"
  50. groups: service_master
  51. when: master_names is defined and master_names.0 is defined
  52. - include: update.yml
  53. - include: list.yml