Use dnf module to get rid of warning

Ansible throws a warning on this command;
[WARNING]: Consider using the dnf module rather than running 'dnf'

Change-Id: Icc2aac744837676fe6b48fad44187ef750039d7a
This commit is contained in:
Erik Berg 2022-10-18 18:39:43 +02:00
parent 18ff3195fc
commit 35f69ead1e
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@
# Until the role handles it, install it using the --allowerasing option
# which will remove coreutils-single.
- name: Ensure coreutils package is installed
command: "dnf install coreutils -y --allowerasing"
dnf:
name: coreutils
allowerasing: true
become: True
when:
- ansible_facts.os_family == 'RedHat'