summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster/launch.yml
blob: 6630fa27dddc9b53ea9d91abc90bd4cbd7e60a2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- name: Launch instance(s)
  hosts: localhost
  gather_facts: no
  vars_files:
  - vars.yml
  vars:
    os_libvirt_storage_pool: "{{ libvirt_storage_pool | default('images') }}"
    os_libvirt_storage_pool_path: "{{ libvirt_storage_pool_path | default('/var/lib/libvirt/images') }}"
    os_libvirt_network: "{{ libvirt_network | default('default') }}"
    image_url: "{{ deployment_vars[deployment_type].image.url }}"
    image_sha256: "{{ deployment_vars[deployment_type].image.sha256 }}"
    image_name: "{{ deployment_vars[deployment_type].image.name }}"
  tasks:
  - fail: msg="Deployment type not supported for libvirt provider yet"
    when: deployment_type == 'online'

  - include: tasks/configure_libvirt.yml

  - include: ../../common/openshift-cluster/set_master_launch_facts_tasks.yml
  - include: tasks/launch_instances.yml
    vars:
      instances: "{{ master_names }}"
      cluster: "{{ cluster_id }}"
      type: "{{ k8s_type }}"
      g_sub_host_type: "default"

  - include: ../../common/openshift-cluster/set_node_launch_facts_tasks.yml
    vars:
      type: "compute"
      count: "{{ num_nodes }}"
  - include: tasks/launch_instances.yml
    vars:
      instances: "{{ node_names }}"
      cluster: "{{ cluster_id }}"
      type: "{{ k8s_type }}"
      g_sub_host_type: "{{ sub_host_type }}"

  - include: ../../common/openshift-cluster/set_node_launch_facts_tasks.yml
    vars:
      type: "infra"
      count: "{{ num_infra }}"
  - include: tasks/launch_instances.yml
    vars:
      instances: "{{ infra_names }}"
      cluster: "{{ cluster_id }}"
      type: "{{ k8s_type }}"
      g_sub_host_type: "{{ sub_host_type }}"

- include: update.yml

- include: list.yml