mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
allow file_client to figure out cachedir
We do not need to specify the entire path here. _cache_loc in salt.fileclient will do that for us. If we specify cachedir here, it will use the /var/tmp/*/running_data/var/cache path which we do not want to use when on the master. This is intelligent enough to use the /var/tmp path on the minion and a /var/cache/salt/master type path on the master. Fixes #38458
This commit is contained in:
parent
b855f29928
commit
8367735063
1 changed files with 2 additions and 2 deletions
|
@ -184,10 +184,10 @@ def prep_trans_tar(opts, file_client, chunks, file_refs, pillar=None, id_=None):
|
|||
if id_ is None:
|
||||
id_ = ''
|
||||
try:
|
||||
cachedir = os.path.join(opts['cachedir'], 'salt-ssh', id_).rstrip(os.sep)
|
||||
cachedir = os.path.join('salt-ssh', id_).rstrip(os.sep)
|
||||
except AttributeError:
|
||||
# Minion ID should always be a str, but don't let an int break this
|
||||
cachedir = os.path.join(opts['cachedir'], 'salt-ssh', str(id_)).rstrip(os.sep)
|
||||
cachedir = os.path.join('salt-ssh', str(id_)).rstrip(os.sep)
|
||||
|
||||
for saltenv in file_refs:
|
||||
# Location where files in this saltenv will be cached
|
||||
|
|
Loading…
Add table
Reference in a new issue