launch.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ---
  2. - name: Launch instance(s)
  3. hosts: localhost
  4. connection: local
  5. gather_facts: no
  6. vars_files:
  7. - vars.yml
  8. - ["vars.{{ deployment_type }}.{{ cluster_id }}.yml", vars.defaults.yml]
  9. tasks:
  10. - fail:
  11. msg: Deployment type not supported for aws provider yet
  12. when: deployment_type == 'enterprise'
  13. - include: ../../common/openshift-cluster/set_etcd_launch_facts_tasks.yml
  14. - include: tasks/launch_instances.yml
  15. vars:
  16. instances: "{{ etcd_names }}"
  17. cluster: "{{ cluster_id }}"
  18. type: "{{ k8s_type }}"
  19. - include: ../../common/openshift-cluster/set_master_launch_facts_tasks.yml
  20. - include: tasks/launch_instances.yml
  21. vars:
  22. instances: "{{ master_names }}"
  23. cluster: "{{ cluster_id }}"
  24. type: "{{ k8s_type }}"
  25. - include: ../../common/openshift-cluster/set_node_launch_facts_tasks.yml
  26. - include: tasks/launch_instances.yml
  27. vars:
  28. instances: "{{ node_names }}"
  29. cluster: "{{ cluster_id }}"
  30. type: "{{ k8s_type }}"
  31. - add_host:
  32. name: "{{ master_names.0 }}"
  33. groups: service_master
  34. when: master_names is defined and master_names.0 is defined
  35. - include: update.yml
  36. - include: ../../common/openshift-cluster/create_services.yml
  37. vars:
  38. g_svc_master: "{{ service_master }}"
  39. - include: list.yml