launch.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. - name: Launch instance(s)
  3. hosts: localhost
  4. gather_facts: no
  5. vars_files:
  6. - vars.yml
  7. vars:
  8. os_libvirt_storage_pool: "{{ libvirt_storage_pool | default('images') }}"
  9. os_libvirt_storage_pool_path: "{{ libvirt_storage_pool_path | default('/var/lib/libvirt/images') }}"
  10. os_libvirt_network: "{{ libvirt_network | default('default') }}"
  11. image_url: "{{ deployment_vars[deployment_type].image.url }}"
  12. image_sha256: "{{ deployment_vars[deployment_type].image.sha256 }}"
  13. image_name: "{{ deployment_vars[deployment_type].image.name }}"
  14. tasks:
  15. - fail: msg="Deployment type not supported for libvirt provider yet"
  16. when: deployment_type == 'online'
  17. - include: tasks/configure_libvirt.yml
  18. - include: ../../common/openshift-cluster/set_master_launch_facts_tasks.yml
  19. - include: tasks/launch_instances.yml
  20. vars:
  21. instances: "{{ master_names }}"
  22. cluster: "{{ cluster_id }}"
  23. type: "{{ k8s_type }}"
  24. g_sub_host_type: "default"
  25. - include: ../../common/openshift-cluster/set_node_launch_facts_tasks.yml
  26. vars:
  27. type: "compute"
  28. count: "{{ num_nodes }}"
  29. - include: tasks/launch_instances.yml
  30. vars:
  31. instances: "{{ node_names }}"
  32. cluster: "{{ cluster_id }}"
  33. type: "{{ k8s_type }}"
  34. g_sub_host_type: "{{ sub_host_type }}"
  35. - include: ../../common/openshift-cluster/set_node_launch_facts_tasks.yml
  36. vars:
  37. type: "infra"
  38. count: "{{ num_infra }}"
  39. - include: tasks/launch_instances.yml
  40. vars:
  41. instances: "{{ node_names }}"
  42. cluster: "{{ cluster_id }}"
  43. type: "{{ k8s_type }}"
  44. g_sub_host_type: "{{ sub_host_type }}"
  45. - include: update.yml
  46. - include: list.yml