Merge pull request #31190 from twangboy/refresh_db

Clear minion cache before caching from master
This commit is contained in:
Mike Place 2016-02-16 09:11:26 -07:00
commit 80f1c3553b

View File

@ -383,6 +383,13 @@ def refresh_db(saltenv='base'):
else:
winrepo_source_dir = __opts__['winrepo_source_dir']
# Clear minion repo-ng cache
repo_path = '{0}\\files\\{1}\\win\\repo-ng\\salt-winrepo-ng'\
.format(__opts__['cachedir'], saltenv)
if not __salt__['file.remove'](repo_path):
log.error('pkg.refresh_db: failed to clear existing cache')
# Cache repo-ng locally
cached_files = __salt__['cp.cache_dir'](
winrepo_source_dir,
saltenv,