From 9e4c80195d0c0eb6d44b52104aef1110d52eaa21 Mon Sep 17 00:00:00 2001 From: Shalin Patel Date: Mon, 20 May 2024 15:39:04 -0700 Subject: [PATCH] fix: clean yum cache after adding repos (#1081) (#1085) * fix: clean yum cache after adding repos * fix: clean cache for rhel/centos 7 only --- ansible/roles/repo/tasks/redhat.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/roles/repo/tasks/redhat.yaml b/ansible/roles/repo/tasks/redhat.yaml index e86b86d1e..183149cff 100644 --- a/ansible/roles/repo/tasks/redhat.yaml +++ b/ansible/roles/repo/tasks/redhat.yaml @@ -119,3 +119,7 @@ until: konvoy_repo_installation_rpm is success retries: 5 delay: 6 + +- name: clean yum caches + shell: yum clean all + when: ansible_distribution_major_version == '7'