From b7ff4b354c7c22adb4ad5ccfde50253667133d72 Mon Sep 17 00:00:00 2001 From: Nestor Acuna Blanco Date: Fri, 22 Nov 2024 13:09:27 +0100 Subject: [PATCH] feat: disable distributions incompatible with s390x architecture Signed-off-by: Nestor Acuna Blanco --- generate-templates.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/generate-templates.yaml b/generate-templates.yaml index 76480bc2..99435782 100644 --- a/generate-templates.yaml +++ b/generate-templates.yaml @@ -88,11 +88,13 @@ - name: Load RHEL 7 versions set_fact: rhel7_labels: "{{ lookup('osinfo', 'distro=rhel') |map(attribute='short_id') |select('match', '^rhel7\\.') |list |sort }}" + when: target_arch != "s390x" - name: Load RHEL 7 image urls set_fact: rhel7_image_urls: "{{ rhel7_image_urls |default([]) + lookup('osinfo', item) |attr('image_list') |selectattr('architecture', 'eq', 'x86_64') |selectattr('format', 'in', ['raw', 'qcow2']) |map(attribute='url') |list }}" loop: "{{ rhel7_labels }}" + when: target_arch != "s390x" - name: Generate RHEL 7 templates template: @@ -119,6 +121,7 @@ osinfoname: "{{ oslabels[0] }}" cloudusername: cloud-user image_urls: "{{ rhel7_image_urls }}" + when: target_arch != "s390x" - name: Load CentOS Stream 9 containerdisk and image urls set_fact: @@ -209,11 +212,13 @@ - name: Load openSUSE versions set_fact: opensuse_labels: "{{ lookup('osinfo', 'distro=opensuse') |select('osinfo_active') |map(attribute='short_id') |list |sort }}" + when: target_arch != "s390x" - name: Load openSUSE image urls set_fact: opensuse_image_urls: "{{ opensuse_image_urls |default([]) + lookup('osinfo', item) |attr('image_list') |selectattr('architecture', 'eq', 'x86_64') |selectattr('format', 'in', ['raw', 'qcow2']) |map(attribute='url') |list }}" loop: "{{ opensuse_labels }}" + when: target_arch != "s390x" - name: Generate openSUSE templates template: @@ -232,6 +237,7 @@ osinfoname: "{{ oslabels[0] }}" cloudusername: opensuse image_urls: "{{ opensuse_image_urls }}" + when: target_arch != "s390x" - name: Load Ubuntu versions set_fact: @@ -275,6 +281,7 @@ - {flavor: large, workload: highperformance, memsize: "8Gi", cpus: 2, iothreads: True, emulatorthread: True, multiqueue: True, tablet: True, default: False} vars: osinfoname: win2k16 + when: target_arch != "s390x" - name: Generate Windows server 2019 templates template: @@ -287,6 +294,7 @@ - {flavor: large, workload: highperformance, memsize: "8Gi", cpus: 2, iothreads: True, emulatorthread: True, multiqueue: True, tablet: True, default: False} vars: osinfoname: win2k19 + when: target_arch != "s390x" - name: Generate Windows 10 templates template: @@ -299,6 +307,7 @@ - {flavor: large, workload: highperformance, memsize: "8Gi", cpus: 2, iothreads: True, emulatorthread: True, multiqueue: True, tablet: True, default: False} vars: osinfoname: win10 + when: target_arch != "s390x" - name: Generate Windows 11 templates template: @@ -311,6 +320,7 @@ - {flavor: large, workload: highperformance, memsize: "8Gi", cpus: 2, iothreads: True, emulatorthread: True, multiqueue: True, tablet: True, default: False} vars: osinfoname: win11 + when: target_arch != "s390x" - name: Generate Windows server 2022 templates template: @@ -323,6 +333,7 @@ - {flavor: large, workload: highperformance, memsize: "8Gi", cpus: 2, iothreads: True, emulatorthread: True, multiqueue: True, tablet: True, default: False} vars: osinfoname: win2k22 + when: target_arch != "s390x" - name: Generate Windows server 2025 templates template: @@ -335,3 +346,4 @@ - {flavor: large, workload: highperformance, memsize: "8Gi", cpus: 2, iothreads: True, emulatorthread: True, multiqueue: True, tablet: True, default: False} vars: osinfoname: win2k25 + when: target_arch != "s390x"