mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #31190 from twangboy/refresh_db
Clear minion cache before caching from master
This commit is contained in:
commit
80f1c3553b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user