From 6094f9c46f6909f1594fa1610f2df5d3f36aaad7 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Tue, 16 Feb 2021 00:17:55 +0000 Subject: [PATCH] Enable PowerTools on CentOS Stream --- roles/el/tasks/packages-cli.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/el/tasks/packages-cli.yml b/roles/el/tasks/packages-cli.yml index 8a167ba..879ffef 100644 --- a/roles/el/tasks/packages-cli.yml +++ b/roles/el/tasks/packages-cli.yml @@ -1,4 +1,16 @@ --- +- name: Check for CentOS-Stream-PowerTools.repo file + stat: + path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo + register: pt +- name: Enable CentOS Stream PowerTools repository + become: true + lineinfile: + path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo + create: false + regexp: ^enabled= + line: enabled=1 + when: ansible_distribution == 'CentOS' and pt.stat.exists - name: Install CLI packages become: true dnf: