From d2347b1f6a5e1e1b9fea1b0773274dd862f134e2 Mon Sep 17 00:00:00 2001 From: Andrei Stepanov Date: May 04 2020 12:36:35 +0000 Subject: Merge #381 `allow dnf to install packages with allowerasing` --- diff --git a/roles/str-common-pkgs/tasks/pkgs-dnf.yml b/roles/str-common-pkgs/tasks/pkgs-dnf.yml index 1d20621..75c5ebe 100644 --- a/roles/str-common-pkgs/tasks/pkgs-dnf.yml +++ b/roles/str-common-pkgs/tasks/pkgs-dnf.yml @@ -1,12 +1,10 @@ -- name: Remove yum-utils for dnf system - package: name=yum-utils state=absent - register: result - retries: 5 - delay: 10 - until: result is succeeded - - name: Install additional dnf packages - package: name={{ item }} state=present + # Note, use allowerasing in case yum-utils and dnf-utils conflict with each other + # usually there should be no conflict, but sometimes installing dnf-utils will actually install yum-utils + shell: | + dnf install --assumeyes --allowerasing {{item}} + args: + warn: false register: result with_items: - dnf-plugins-core @@ -27,7 +25,11 @@ - name: Install test-specific package requirements # Note, this method cannot install -debuginfo packages. - package: name={{ item }} state=present + # Note, package module doesn't support allowerasing + shell: | + dnf install --assumeyes --allowerasing {{item}} + args: + warn: false register: result with_flattened: - "{{ pkgs_ordinary_req|d|list }}"