Merge pull request #48765 from FedericoCeratto/fix_mine.get_not_returning_data

[2018.3] Fix mine.get not returning data
This commit is contained in:
Nicole Thomas 2018-07-27 14:01:05 -04:00 committed by GitHub
commit bd67d2a805
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -239,12 +239,12 @@ class CkMinions(object):
Retreive complete minion list from PKI dir.
Respects cache if configured
'''
if self.opts.get('__role') == 'master' and self.opts.get('__cli') == 'salt-run':
# Compiling pillar directly on the master, just return the master's
# ID as that is the only one that is available.
return [self.opts['id']]
minions = []
pki_cache_fn = os.path.join(self.opts['pki_dir'], self.acc, '.key_cache')
try:
os.makedirs(os.path.dirname(pki_cache_fn))
except OSError:
pass
try:
if self.opts['key_cache'] and os.path.exists(pki_cache_fn):
log.debug('Returning cached minion list')