Add 'yum clean metadata' after updating the saltstack.repo file as requested.

According to https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-working_with_yum_cache
this option "eliminates all files that yum uses to determine the remote
availability of packages."
This commit is contained in:
pjcreath 2018-03-16 20:10:23 -04:00
parent aa52ca51dd
commit f1df3ec949

View file

@ -3564,6 +3564,7 @@ _eof
fetch_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${repo_rev}/"
__rpm_import_gpg "${fetch_url}${gpg_key}" || return 1
yum clean metadata || return 1
elif [ "$repo_rev" != "latest" ]; then
echowarn "saltstack.repo already exists, ignoring salt version argument."
echowarn "Use -F (forced overwrite) to install $repo_rev."