From 1739b27231671d8ec8cf18165021a35534edd4b0 Mon Sep 17 00:00:00 2001 From: jiriproX Date: Sat, 5 Jun 2021 13:16:39 +0200 Subject: [PATCH] Replace yum module with package module (#7621) --- contrib/kvm-setup/roles/kvm-setup/tasks/main.yml | 2 +- .../glusterfs/roles/glusterfs/client/tasks/setup-RedHat.yml | 4 ++-- .../glusterfs/roles/glusterfs/server/tasks/main.yml | 2 +- .../glusterfs/roles/glusterfs/server/tasks/setup-RedHat.yml | 4 ++-- contrib/network-storage/heketi/roles/prepare/tasks/main.yml | 2 +- .../heketi/roles/tear-down-disks/tasks/main.yml | 4 ++-- roles/container-engine/docker-storage/tasks/main.yml | 2 +- roles/container-engine/docker/tasks/pre-upgrade.yml | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/kvm-setup/roles/kvm-setup/tasks/main.yml b/contrib/kvm-setup/roles/kvm-setup/tasks/main.yml index 543fee5a0..a033c4ee9 100644 --- a/contrib/kvm-setup/roles/kvm-setup/tasks/main.yml +++ b/contrib/kvm-setup/roles/kvm-setup/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install required packages - yum: + package: name: "{{ item }}" state: present with_items: diff --git a/contrib/network-storage/glusterfs/roles/glusterfs/client/tasks/setup-RedHat.yml b/contrib/network-storage/glusterfs/roles/glusterfs/client/tasks/setup-RedHat.yml index 2034aa8ef..86827efcd 100644 --- a/contrib/network-storage/glusterfs/roles/glusterfs/client/tasks/setup-RedHat.yml +++ b/contrib/network-storage/glusterfs/roles/glusterfs/client/tasks/setup-RedHat.yml @@ -1,10 +1,10 @@ --- - name: Install Prerequisites - yum: name={{ item }} state=present + package: name={{ item }} state=present with_items: - "centos-release-gluster{{ glusterfs_default_release }}" - name: Install Packages - yum: name={{ item }} state=present + package: name={{ item }} state=present with_items: - glusterfs-client diff --git a/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/main.yml b/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/main.yml index b8fe9f9e3..11269a6e7 100644 --- a/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/main.yml +++ b/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/main.yml @@ -9,7 +9,7 @@ when: ansible_os_family == "Debian" - name: install xfs RedHat - yum: name=xfsprogs state=present + package: name=xfsprogs state=present when: ansible_os_family == "RedHat" # Format external volumes in xfs diff --git a/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/setup-RedHat.yml b/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/setup-RedHat.yml index 257c0106c..9dc8f0bb4 100644 --- a/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/setup-RedHat.yml +++ b/contrib/network-storage/glusterfs/roles/glusterfs/server/tasks/setup-RedHat.yml @@ -1,11 +1,11 @@ --- - name: Install Prerequisites - yum: name={{ item }} state=present + package: name={{ item }} state=present with_items: - "centos-release-gluster{{ glusterfs_default_release }}" - name: Install Packages - yum: name={{ item }} state=present + package: name={{ item }} state=present with_items: - glusterfs-server - glusterfs-client diff --git a/contrib/network-storage/heketi/roles/prepare/tasks/main.yml b/contrib/network-storage/heketi/roles/prepare/tasks/main.yml index dd5a69350..dad3bae97 100644 --- a/contrib/network-storage/heketi/roles/prepare/tasks/main.yml +++ b/contrib/network-storage/heketi/roles/prepare/tasks/main.yml @@ -11,7 +11,7 @@ - name: "Install glusterfs mount utils (RedHat)" become: true - yum: + package: name: "glusterfs-fuse" state: "present" when: "ansible_os_family == 'RedHat'" diff --git a/contrib/network-storage/heketi/roles/tear-down-disks/tasks/main.yml b/contrib/network-storage/heketi/roles/tear-down-disks/tasks/main.yml index 7ddbf65c8..43a7b4916 100644 --- a/contrib/network-storage/heketi/roles/tear-down-disks/tasks/main.yml +++ b/contrib/network-storage/heketi/roles/tear-down-disks/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: "Install lvm utils (RedHat)" become: true - yum: + package: name: "lvm2" state: "present" when: "ansible_os_family == 'RedHat'" @@ -39,7 +39,7 @@ - name: "Remove lvm utils (RedHat)" become: true - yum: + package: name: "lvm2" state: "absent" when: "ansible_os_family == 'RedHat' and heketi_remove_lvm" diff --git a/roles/container-engine/docker-storage/tasks/main.yml b/roles/container-engine/docker-storage/tasks/main.yml index 12f215e7a..6fb6d3f24 100644 --- a/roles/container-engine/docker-storage/tasks/main.yml +++ b/roles/container-engine/docker-storage/tasks/main.yml @@ -33,7 +33,7 @@ # https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository - name: docker-storage-setup | install lvm2 - yum: + package: name: lvm2 state: present diff --git a/roles/container-engine/docker/tasks/pre-upgrade.yml b/roles/container-engine/docker/tasks/pre-upgrade.yml index d344b222d..85c1819a0 100644 --- a/roles/container-engine/docker/tasks/pre-upgrade.yml +++ b/roles/container-engine/docker/tasks/pre-upgrade.yml @@ -16,7 +16,7 @@ - (docker_versioned_pkg[docker_version | string] is search('docker-ce')) - name: Ensure old versions of Docker are not installed. | RedHat - yum: + package: name: '{{ docker_remove_packages_yum }}' state: absent when: