From: Anil Belur Date: Sat, 29 May 2021 03:47:14 +0000 (+1000) Subject: Fix: Change powertools repoid to lowercase X-Git-Tag: v0.8.0^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=9887783bc9508cf52de68705c5df7ba66fcba157;p=releng%2Fcommon-packer.git Fix: Change powertools repoid to lowercase 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 --- diff --git a/provision/install-base-pkgs-RedHat.yaml b/provision/install-base-pkgs-RedHat.yaml index 201abfb..1e6ebdf 100644 --- a/provision/install-base-pkgs-RedHat.yaml +++ b/provision/install-base-pkgs-RedHat.yaml @@ -15,10 +15,18 @@ 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', '>=')