mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
ovirt: update of upi playbook files (guaranteed memory added,
ovirt.ovirt collection role updated and check for template added)
This commit is contained in:
@@ -6,28 +6,6 @@
|
||||
tasks:
|
||||
- import_tasks: common-auth.yml
|
||||
|
||||
- name: Check local image existance
|
||||
stat:
|
||||
get_mime: no
|
||||
get_checksum: no
|
||||
get_attributes: no
|
||||
path: "{{ rhcos.local_image_path }}"
|
||||
register: image_stats
|
||||
loop:
|
||||
- "{{ rhcos.local_cmp_image_path }}"
|
||||
- "{{ rhcos.local_image_path }}"
|
||||
|
||||
- name: Download RHCOS image
|
||||
get_url:
|
||||
url: "{{ rhcos.image_url }}"
|
||||
dest: "{{ rhcos.local_cmp_image_path}}"
|
||||
force: no
|
||||
when: not image_stats.results[1].stat.exists
|
||||
|
||||
- name: Extract RHCOS image
|
||||
shell: "gunzip -c {{ rhcos.local_cmp_image_path }} > {{ rhcos.local_image_path }}"
|
||||
when: not image_stats.results[0].stat.exists
|
||||
|
||||
- name: Get templates info
|
||||
ovirt_template_info:
|
||||
auth: "{{ ovirt_auth }}"
|
||||
@@ -46,16 +24,43 @@
|
||||
}}
|
||||
with_items: "{{ templates_info.results }}"
|
||||
|
||||
- name: Create rhcos template
|
||||
when: templates_list | length < 2
|
||||
block:
|
||||
- name: Check local image existance
|
||||
stat:
|
||||
get_mime: no
|
||||
get_checksum: no
|
||||
get_attributes: no
|
||||
path: "{{ rhcos.local_image_path }}"
|
||||
register: image_stats
|
||||
loop:
|
||||
- "{{ rhcos.local_cmp_image_path }}"
|
||||
- "{{ rhcos.local_image_path }}"
|
||||
|
||||
- name: Download RHCOS image
|
||||
when: not image_stats.results[1].stat.exists
|
||||
get_url:
|
||||
url: "{{ rhcos.image_url }}"
|
||||
dest: "{{ rhcos.local_cmp_image_path}}"
|
||||
force: no
|
||||
|
||||
- name: Extract RHCOS image
|
||||
shell: "gunzip -c {{ rhcos.local_cmp_image_path }} > {{ rhcos.local_image_path }}"
|
||||
when: not image_stats.results[0].stat.exists
|
||||
|
||||
- name: Create templates
|
||||
include_role:
|
||||
name: ovirt.image-template
|
||||
name: ovirt.ovirt.image_template
|
||||
vars:
|
||||
qcow_url: "file://{{ rhcos.local_image_path }}"
|
||||
image_path: "{{ rhcos.local_image_path }}"
|
||||
template_cluster: "{{ item.cluster }}"
|
||||
template_name: "{{ item.template }}"
|
||||
template_name: "{{ item.disks.0.name }}"
|
||||
template_memory_guaranteed: "{{ item.memory_guaranteed | default(omit) }}"
|
||||
template_disk_storage: "{{ item.disks.0.storage_domain }}"
|
||||
template_disk_size: "{{ item.disks.0.size }}"
|
||||
template_disk_interface: "{{ item.disks.0.interface }}"
|
||||
template_operating_system: "{{ item.operating_system }}"
|
||||
template_seal: no
|
||||
loop:
|
||||
@@ -65,4 +70,4 @@
|
||||
|
||||
- name: Create VMs infra
|
||||
include_role:
|
||||
name: ovirt.vm-infra
|
||||
name: ovirt.ovirt.vm_infra
|
||||
|
||||
@@ -14,9 +14,10 @@ all:
|
||||
|
||||
control_plane:
|
||||
cluster: "{{ ovirt_cluster }}"
|
||||
memory: 16GiB
|
||||
sockets: 4
|
||||
cores: 1
|
||||
memory: 12GiB
|
||||
guarantee_memory: 12GiB
|
||||
sockets: 1
|
||||
cores: 4
|
||||
template: rhcos_tpl
|
||||
operating_system: "rhcos_x64"
|
||||
type: high_performance
|
||||
@@ -37,9 +38,10 @@ all:
|
||||
|
||||
compute:
|
||||
cluster: "{{ ovirt_cluster }}"
|
||||
memory: 16GiB
|
||||
sockets: 4
|
||||
cores: 1
|
||||
memory: 12GiB
|
||||
guarantee_memory: 12GiB
|
||||
sockets: 1
|
||||
cores: 4
|
||||
template: worker_rhcos_tpl
|
||||
operating_system: "rhcos_x64"
|
||||
type: high_performance
|
||||
|
||||
Reference in New Issue
Block a user