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 committed by rallytime
parent 03273de164
commit 056f8d8a39
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19

View file

@ -3576,6 +3576,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."