launch.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ---
  2. - name: Launch instance(s)
  3. hosts: localhost
  4. become: no
  5. connection: local
  6. gather_facts: no
  7. vars_files:
  8. - vars.yml
  9. vars:
  10. image_url: "{{ deployment_vars[deployment_type].image.url }}"
  11. image_sha256: "{{ deployment_vars[deployment_type].image.sha256 }}"
  12. image_name: "{{ deployment_vars[deployment_type].image.name }}"
  13. image_compression: "{{ deployment_vars[deployment_type].image.compression }}"
  14. tasks:
  15. - include: tasks/configure_libvirt.yml
  16. - include: ../../common/openshift-cluster/tasks/set_etcd_launch_facts.yml
  17. - include: tasks/launch_instances.yml
  18. vars:
  19. instances: "{{ etcd_names }}"
  20. cluster: "{{ cluster_id }}"
  21. type: "{{ k8s_type }}"
  22. g_sub_host_type: "default"
  23. - include: ../../common/openshift-cluster/tasks/set_master_launch_facts.yml
  24. - include: tasks/launch_instances.yml
  25. vars:
  26. instances: "{{ master_names }}"
  27. cluster: "{{ cluster_id }}"
  28. type: "{{ k8s_type }}"
  29. g_sub_host_type: "default"
  30. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  31. vars:
  32. type: "compute"
  33. count: "{{ num_nodes }}"
  34. - include: tasks/launch_instances.yml
  35. vars:
  36. instances: "{{ node_names }}"
  37. cluster: "{{ cluster_id }}"
  38. type: "{{ k8s_type }}"
  39. g_sub_host_type: "{{ sub_host_type }}"
  40. - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
  41. vars:
  42. type: "infra"
  43. count: "{{ num_infra }}"
  44. - include: tasks/launch_instances.yml
  45. vars:
  46. instances: "{{ node_names }}"
  47. cluster: "{{ cluster_id }}"
  48. type: "{{ k8s_type }}"
  49. g_sub_host_type: "{{ sub_host_type }}"
  50. - include: update.yml
  51. - include: list.yml