diff --git a/purge-cluster.yml b/purge-cluster.yml index 499c52f27..b2c8c9473 100644 --- a/purge-cluster.yml +++ b/purge-cluster.yml @@ -426,11 +426,6 @@ notify: - remove data - - name: purge yum cache - command: yum clean all - when: - ansible_pkg_mgr == 'yum' - - name: purge dnf cache command: dnf clean all when: diff --git a/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml b/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml index 927d1d036..39080e675 100644 --- a/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml +++ b/roles/ceph-common/tasks/installs/redhat_ceph_repository.yml @@ -50,3 +50,9 @@ owner: root group: root when: ceph_custom + +# Remove yum caches so yum doesn't get confused if we are reinstalling a different ceph version +- name: purge yum cache + command: yum clean all + when: + ansible_pkg_mgr == 'yum'