Explorar o código

fix rpmfusion check in common role

Blaine Story %!s(int64=3) %!d(string=hai) anos
pai
achega
15bdc1bfe3
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      roles/common/tasks/main.yml

+ 9 - 1
roles/common/tasks/main.yml

@@ -48,6 +48,14 @@
     - ansible_distribution == 'CentOS'
     - ansible_distribution_major_version == "8"
 
+- name: Check for RPMFusion rpms
+  shell:
+    cmd: rpm -q rpmfusion-free-release
+    warn: false
+  failed_when: false
+  changed_when: false
+  register: rpmfusion_check
+
 - name: Download RPMFusion .rpms 
   get_url:
     url: "{{ item }}"
@@ -64,7 +72,7 @@
   when:
     - ansible_distribution == 'CentOS' or ansible_distribution == 'Fedora'
     - ansible_distribution_major_version != "9" # no RPMFusion yet for CentOS Stream 9
-    - '"rpmfusion" not in ansible_facts.packages|list'
+    - rpmfusion_check.rc != "0"
 
 
 - name: Install RPMFusion .rpms