Fix PowerTools enablement and IUS install 42/64042/1 v0.5.1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 20 May 2020 20:08:50 +0000 (13:08 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 20 May 2020 20:08:50 +0000 (13:08 -0700)
* Use correct syntax for verifying the major version(s) we
  should be setting IUS up on
* Fix the fact we're checking to know if should be enabling
  the PowerTools repo

Change-Id: I3340d5aae147a2c5881d973442fba4e9543d8c1e
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
provision/install-base-pkgs-RedHat.yaml

index 59a9b5d..6a6252a 100644 (file)
       - yum-plugin-replace
   become: true
   when:
-    - ansible_distribution_major_version < 8
+    - ansible_facts['distribution_major_version'] is version('8', '<')
 
 - name: Enable PowerTools
   command:
     cmd: dnf config-manager --set-enabled PowerTools
     warn: no
   become: true
-  when: ansible_facts['distribution_version'] is version('8', '>=')
+  when: ansible_facts['distribution_major_version'] is version('8', '>=')
 
 - name: Install base packages
   yum: