Build Windows Templates in RHV

This commit is contained in:
2021-05-03 13:47:44 -04:00
parent 595021d449
commit 28c9375b0d
290 changed files with 10931 additions and 159 deletions

View File

@@ -0,0 +1,40 @@
---
- name: fail if cluster name is not specified
fail:
msg: "cluster name is not specified, please specify providers.ovirt.cluster"
when: (providers.ovirt.cluster | default(None)) is undefined
- name: get the datacenter name
ovirt_datacenter_info:
auth: "{{ ovirt_auth }}"
pattern: "Clusters.name = {{ providers.ovirt.cluster }}"
register: datacenter_info
- name: fail if datacenter is not found
fail:
msg: "data center is not found"
when: datacenter_info.ovirt_datacenters | length == 0
- name: get storage information
ovirt_storage_domain_info:
auth: "{{ ovirt_auth }}"
pattern: "datacenter={{ datacenter_info.ovirt_datacenters[0].name }}"
register: storage_info
- name: set data domain
set_fact:
disk_storage_domain: "{{ storage_info.ovirt_storage_domains|json_query(the_query)|list|first|default(None) }}"
vars:
the_query: "[?type=='data']"
- name: set iso domain (deprecated as of oVirt/RHV 4.3)
set_fact:
iso_domain: "{{ storage_info.ovirt_storage_domains|json_query(the_query)|list|first|default(None) }}"
vars:
the_query: "[?type=='iso']"
- include_tasks: template_check.yml
loop: "{{ nodes }}"
loop_control:
loop_var: node