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

Lucas Mateus Castro(alqotel) posted 8 patches 3 years, 6 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
There is a newer version of this series
[PATCH 6/8] scripts/ci/setup: Add Fedora to build-environment.yml
Posted by Lucas Mateus Castro(alqotel) 3 years, 6 months ago
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 --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'
-- 
2.25.1