From 06503c92e0299124355bf724c022e7026ac6ddfe Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Wed, 20 Nov 2024 09:34:54 -0700 Subject: [PATCH] test: full test uses cockpit-composer or cockpit-machines Ensure the correct package is looked for in the extra/full packages test. --- tests/tests_packages_full.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/tests_packages_full.yml b/tests/tests_packages_full.yml index 00b0c3a..075bb17 100644 --- a/tests/tests_packages_full.yml +++ b/tests/tests_packages_full.yml @@ -1,6 +1,7 @@ --- - name: "Test cockpit_packages: full" hosts: all + gather_facts: true tasks: - name: Tests block: @@ -32,10 +33,14 @@ when: "'cockpit' not in ansible_facts.packages" # extra package (part of full) - - name: Test - cockpit-machines package is installed + - name: Test - extra package is installed fail: - msg: cockpit-machines is not installed - when: "'cockpit-machines' not in ansible_facts.packages" + msg: "{{ __extra_pkg }} is not installed" + when: __extra_pkg not in ansible_facts.packages + vars: + __extra_pkg: "{{ 'cockpit-composer' + if ansible_facts['os_family'] == 'RedHat' + else 'cockpit-machines' }}" # another extra package (part of full) - name: Test - cockpit-doc is installed