From f1b1dac68f571d1128492dc066e2dde9d9d2512d Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 17 May 2022 08:54:16 +0200 Subject: [PATCH] copr-hypervisors: upload images to p08 and p09 hypervisors --- .../copr/backend/templates/provision/upload-qcow2-images | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/roles/copr/backend/templates/provision/upload-qcow2-images b/roles/copr/backend/templates/provision/upload-qcow2-images index 3d8b2c50cc..c811451f22 100755 --- a/roles/copr/backend/templates/provision/upload-qcow2-images +++ b/roles/copr/backend/templates/provision/upload-qcow2-images @@ -6,11 +6,16 @@ image=$1 libvirt_connections=' {% for host in groups["copr_hypervisor"] %} -{% for arch in ["p08", "x86"] %} -{% if arch in inventory_hostname and arch in hostvars[host]['inventory_hostname'] %} +{% for arch in ["p08", "p09", "x86"] %} +{% if arch in inventory_hostname %} +{% set acceptable = ["p08", "p09"] if arch in ["p08", "p09"] else [arch] %} +{% for check in acceptable %} +{% if check in hostvars[host]['inventory_hostname'] %} qemu+ssh://copr@{{ hostvars[host]['inventory_hostname'] }}/system {% endif %} {% endfor %} +{% endif %} +{% endfor %} {% endfor %} '