From 87a5b57f0ae5a1c1c6821bed242e654fc7ca2125 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Wed, 4 Dec 2024 13:37:59 +0100 Subject: [PATCH] fix: list cloud agent packages by architecture --- tasks/main.yml | 4 ++- tests/tests_cluster_basic_cloud_packages.yml | 14 ++------ vars/CentOS_10.yml | 36 +++++++++++++------ vars/CentOS_8.yml | 17 +++++---- vars/CentOS_9.yml | 38 ++++++++++++++------ vars/Fedora.yml | 2 +- vars/RedHat.yml | 2 +- vars/RedHat_10.yml | 36 +++++++++++++------ vars/RedHat_8.yml | 17 +++++---- vars/RedHat_9.yml | 38 ++++++++++++++------ vars/Suse.yml | 2 +- 11 files changed, 139 insertions(+), 67 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 304f6f84..b736436c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -74,7 +74,9 @@ ha_cluster_sbd_enabled | ternary(__ha_cluster_sbd_packages, []) + ha_cluster_install_cloud_agents | - ternary(__ha_cluster_cloud_agents_packages, []) + ternary(__ha_cluster_cloud_agents_packages[ansible_architecture] + | d(__ha_cluster_cloud_agents_packages['noarch'] | d([])), + []) + ha_cluster_fence_agent_packages }}" state: "{{ 'latest' if ha_cluster_use_latest_packages else 'present' }}" diff --git a/tests/tests_cluster_basic_cloud_packages.yml b/tests/tests_cluster_basic_cloud_packages.yml index 0bfc1f5e..a0c5da0e 100644 --- a/tests/tests_cluster_basic_cloud_packages.yml +++ b/tests/tests_cluster_basic_cloud_packages.yml @@ -7,24 +7,16 @@ vars: ha_cluster_cluster_name: test-cluster ha_cluster_install_cloud_agents: true + # Only agents available on all architectures are listed so that we don't + # need a special case for each architecture. __test_agents_rhel_8: - - resource-agents-aliyun - - resource-agents-gcp - - fence-agents-aliyun - fence-agents-aws - fence-agents-azure-arm - fence-agents-gce + # RHEL 10 has the same agents as RHEL 9 __test_agents_rhel_9: - - resource-agents-cloud - - fence-agents-aliyun - - fence-agents-aws - - fence-agents-azure-arm - - fence-agents-compute - - fence-agents-gce - fence-agents-ibm-powervs - fence-agents-ibm-vpc - - fence-agents-kubevirt - - fence-agents-openstack __test_agents: "{{ (ansible_facts['distribution_major_version'] == '8') | ternary(__test_agents_rhel_8, __test_agents_rhel_9) }}" __test_eligible: "{{ diff --git a/vars/CentOS_10.yml b/vars/CentOS_10.yml index b5781243..00a8b861 100644 --- a/vars/CentOS_10.yml +++ b/vars/CentOS_10.yml @@ -12,13 +12,29 @@ __ha_cluster_repos: name: ResilientStorage __ha_cluster_cloud_agents_packages: - - resource-agents-cloud - - fence-agents-aliyun - - fence-agents-aws - - fence-agents-azure-arm - - fence-agents-compute - - fence-agents-gce - - fence-agents-ibm-powervs - - fence-agents-ibm-vpc - - fence-agents-kubevirt - - fence-agents-openstack + x86_64: + - resource-agents-cloud + - fence-agents-aliyun + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-gce + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + aarch64: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + ppc64le: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + s390x: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + noarch: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc diff --git a/vars/CentOS_8.yml b/vars/CentOS_8.yml index b6e6987d..a87761fe 100644 --- a/vars/CentOS_8.yml +++ b/vars/CentOS_8.yml @@ -12,9 +12,14 @@ __ha_cluster_repos: name: ResilientStorage __ha_cluster_cloud_agents_packages: - - resource-agents-aliyun - - resource-agents-gcp - - fence-agents-aliyun - - fence-agents-aws - - fence-agents-azure-arm - - fence-agents-gce + x86_64: + - resource-agents-aliyun + - resource-agents-gcp + - fence-agents-aliyun + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-gce + noarch: + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-gce diff --git a/vars/CentOS_9.yml b/vars/CentOS_9.yml index 62111680..c9d08b1a 100644 --- a/vars/CentOS_9.yml +++ b/vars/CentOS_9.yml @@ -12,13 +12,31 @@ __ha_cluster_repos: name: ResilientStorage __ha_cluster_cloud_agents_packages: - - resource-agents-cloud - - fence-agents-aliyun - - fence-agents-aws - - fence-agents-azure-arm - - fence-agents-compute - - fence-agents-gce - - fence-agents-ibm-powervs - - fence-agents-ibm-vpc - - fence-agents-kubevirt - - fence-agents-openstack + x86_64: + - resource-agents-cloud + - fence-agents-aliyun + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-compute + - fence-agents-gce + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + aarch64: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + ppc64le: + - fence-agents-compute + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + s390x: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + noarch: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc diff --git a/vars/Fedora.yml b/vars/Fedora.yml index da81d994..48e3999f 100644 --- a/vars/Fedora.yml +++ b/vars/Fedora.yml @@ -1,4 +1,4 @@ # SPDX-License-Identifier: MIT --- # Put internal variables here with Fedora specific values. -__ha_cluster_cloud_agents_packages: [] +__ha_cluster_cloud_agents_packages: {} diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 38fccfba..95da94fb 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -23,7 +23,7 @@ __ha_cluster_fullstack_node_packages: - resource-agents - pacemaker -__ha_cluster_cloud_agents_packages: [] +__ha_cluster_cloud_agents_packages: {} __ha_cluster_qdevice_node_packages: - corosync-qdevice diff --git a/vars/RedHat_10.yml b/vars/RedHat_10.yml index bba37b4f..1c71d37e 100644 --- a/vars/RedHat_10.yml +++ b/vars/RedHat_10.yml @@ -12,13 +12,29 @@ __ha_cluster_repos: name: Resilient Storage __ha_cluster_cloud_agents_packages: - - resource-agents-cloud - - fence-agents-aliyun - - fence-agents-aws - - fence-agents-azure-arm - - fence-agents-compute - - fence-agents-gce - - fence-agents-ibm-powervs - - fence-agents-ibm-vpc - - fence-agents-kubevirt - - fence-agents-openstack + x86_64: + - resource-agents-cloud + - fence-agents-aliyun + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-gce + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + aarch64: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + ppc64le: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + s390x: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + noarch: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml index 5709978d..7aba1e77 100644 --- a/vars/RedHat_8.yml +++ b/vars/RedHat_8.yml @@ -12,9 +12,14 @@ __ha_cluster_repos: name: Resilient Storage __ha_cluster_cloud_agents_packages: - - resource-agents-aliyun - - resource-agents-gcp - - fence-agents-aliyun - - fence-agents-aws - - fence-agents-azure-arm - - fence-agents-gce + x86_64: + - resource-agents-aliyun + - resource-agents-gcp + - fence-agents-aliyun + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-gce + noarch: + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-gce diff --git a/vars/RedHat_9.yml b/vars/RedHat_9.yml index 40afae92..c96e3b6c 100644 --- a/vars/RedHat_9.yml +++ b/vars/RedHat_9.yml @@ -12,13 +12,31 @@ __ha_cluster_repos: name: Resilient Storage __ha_cluster_cloud_agents_packages: - - resource-agents-cloud - - fence-agents-aliyun - - fence-agents-aws - - fence-agents-azure-arm - - fence-agents-compute - - fence-agents-gce - - fence-agents-ibm-powervs - - fence-agents-ibm-vpc - - fence-agents-kubevirt - - fence-agents-openstack + x86_64: + - resource-agents-cloud + - fence-agents-aliyun + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-compute + - fence-agents-gce + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + aarch64: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + ppc64le: + - fence-agents-compute + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + - fence-agents-openstack + s390x: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc + - fence-agents-kubevirt + noarch: + - fence-agents-ibm-powervs + - fence-agents-ibm-vpc diff --git a/vars/Suse.yml b/vars/Suse.yml index 43a3936e..6ca017ae 100644 --- a/vars/Suse.yml +++ b/vars/Suse.yml @@ -23,7 +23,7 @@ __ha_cluster_role_essential_packages: __ha_cluster_fullstack_node_packages: [] -__ha_cluster_cloud_agents_packages: [] +__ha_cluster_cloud_agents_packages: {} __ha_cluster_qdevice_node_packages: - corosync-qdevice