diff mbox series

[6/8] scripts/ci/setup: Add Fedora to build-environment.yml

Message ID 20220727163632.59806-7-lucas.araujo@eldorado.org.br
State New
Headers show
Series Patch series to set up a ppc64le CI | expand

Commit Message

Lucas Mateus Martins Araujo e Castro July 27, 2022, 4:36 p.m. UTC
Minicloud doesn't have a RHEL image, but it does have Fedora 34 and 35
images and both use DNF as package manager, so just change the ansible facts
to check if it's RHEL or Fedora

Signed-off-by: Lucas Mateus Castro(alqotel) <lucas.araujo@eldorado.org.br>
---
 scripts/ci/setup/build-environment.yml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/scripts/ci/setup/build-environment.yml b/scripts/ci/setup/build-environment.yml
index 43cf8c759f..a7d53d0f70 100644
--- a/scripts/ci/setup/build-environment.yml
+++ b/scripts/ci/setup/build-environment.yml
@@ -165,8 +165,10 @@ 
           - zlib-devel
         state: present
       when:
-        - ansible_facts['distribution_file_variety'] == 'RedHat'
-        - ansible_facts['distribution_version'] == '8'
+        - |
+           (ansible_facts['distribution'] == 'RedHat' and
+            ansible_facts['distribution_version'] == '8') or
+            ansible_facts['distribution'] == 'Fedora'
 
     - name: Install packages only available on x86 and aarch64
       dnf:
@@ -175,6 +177,8 @@ 
           - spice-server
         state: present
       when:
-        - ansible_facts['distribution_file_variety'] == 'RedHat'
-        - ansible_facts['distribution_version'] == '8'
+        - |
+           (ansible_facts['distribution'] == 'RedHat' and
+            ansible_facts['distribution_version'] == '8') or
+            ansible_facts['distribution'] == 'Fedora'
         - ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64'