launch.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. - fail: msg="Deployment type not supported for gce provider yet"
  11. when: deployment_type == 'enterprise'
  12. - include: ../../common/openshift-cluster/tasks/set_master_launch_facts.yml
  13. - include: tasks/launch_instances.yml
  14. vars:
  15. instances: "{{ master_names }}"
  16. cluster: "{{ cluster_id }}"
  17. type: "{{ k8s_type }}"
  18. g_sub_host_type: "default"
  19. gce_machine_type: "{{ lookup('env', 'gce_machine_master_type') | default(lookup('env', 'gce_machine_type'), true) }}"
  20. gce_machine_image: "{{ lookup('env', 'gce_machine_master_image') | default(lookup('env', 'gce_machine_image'), true) }}"
  21. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  22. vars:
  23. type: "compute"
  24. count: "{{ num_nodes }}"
  25. - include: tasks/launch_instances.yml
  26. vars:
  27. instances: "{{ node_names }}"
  28. cluster: "{{ cluster_id }}"
  29. type: "{{ k8s_type }}"
  30. g_sub_host_type: "{{ sub_host_type }}"
  31. gce_machine_type: "{{ lookup('env', 'gce_machine_node_type') | default(lookup('env', 'gce_machine_type'), true) }}"
  32. gce_machine_image: "{{ lookup('env', 'gce_machine_node_image') | default(lookup('env', 'gce_machine_image'), true) }}"
  33. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  34. vars:
  35. type: "infra"
  36. count: "{{ num_infra }}"
  37. - include: tasks/launch_instances.yml
  38. vars:
  39. instances: "{{ node_names }}"
  40. cluster: "{{ cluster_id }}"
  41. type: "{{ k8s_type }}"
  42. g_sub_host_type: "{{ sub_host_type }}"
  43. - add_host:
  44. name: "{{ master_names.0 }}"
  45. groups: service_master
  46. when: master_names is defined and master_names.0 is defined
  47. - include: update.yml
  48. #
  49. #- name: Deploy OpenShift Services
  50. # hosts: service_master
  51. # connection: ssh
  52. # gather_facts: yes
  53. # roles:
  54. # - openshift_registry
  55. # - openshift_router
  56. #
  57. #- include: ../../common/openshift-cluster/create_services.yml
  58. # vars:
  59. # g_svc_master: "{{ service_master }}"
  60. - include: list.yml