Fix: Change powertools repoid to lowercase 44/67844/4 v0.8.0
authorAnil Belur <abelur@linuxfoundation.org>
Sat, 29 May 2021 03:47:14 +0000 (13:47 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 2 Jun 2021 10:29:16 +0000 (20:29 +1000)
The repoids are renamed with CentOS 8.3 update breaks the packer
builds. Now the correct repoid to use is 'powertools' instead
of 'PowerTools'

Error: No matching repo to modify: PowerTools.

Ref:
https: //wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2011#Yum_repo_file_and_repoid_changes
Issue: RELENG-3710
Change-Id: I43b943ddfc38facaa8c02f2d6ee98254e7ee3241
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
provision/install-base-pkgs-RedHat.yaml

index 201abfb..1e6ebdf 100644 (file)
   when:
     - ansible_facts['distribution_major_version'] is version('8', '<')
 
-- name: Enable PowerTools
-  command:
-    cmd: dnf config-manager --set-enabled PowerTools
-    warn: no
+- name: Enable Powertools
+  block:
+    - name: Enable powertools on version >= 8.3
+      command:
+        cmd: dnf config-manager --set-enabled powertools
+        warn: no
+      when: ansible_facts['distribution_version'] is version('8.3', '>=')
+    - name: Enable Powertools on versions < 8.3
+      command:
+        cmd: dnf config-manager --set-enabled PowerTools
+        warn: no
+      when: ansible_facts['distribution_version'] is version('8.3', '<')
   become: true
   when: ansible_facts['distribution_major_version'] is version('8', '>=')