mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #40047 from rallytime/bp-40000
Back-port #40000 to 2016.11
This commit is contained in:
commit
4067625676
1 changed files with 8 additions and 2 deletions
|
@ -36,10 +36,13 @@ def get_pillar(opts, grains, minion_id, saltenv=None, ext=None, funcs=None,
|
|||
'''
|
||||
Return the correct pillar driver based on the file_client option
|
||||
'''
|
||||
file_client = opts['file_client']
|
||||
if opts.get('master_type') == 'disable' and file_client == 'remote':
|
||||
file_client = 'local'
|
||||
ptype = {
|
||||
'remote': RemotePillar,
|
||||
'local': Pillar
|
||||
}.get(opts['file_client'], Pillar)
|
||||
}.get(file_client, Pillar)
|
||||
# If local pillar and we're caching, run through the cache system first
|
||||
log.debug('Determining pillar cache')
|
||||
if opts['pillar_cache']:
|
||||
|
@ -57,10 +60,13 @@ def get_async_pillar(opts, grains, minion_id, saltenv=None, ext=None, funcs=None
|
|||
'''
|
||||
Return the correct pillar driver based on the file_client option
|
||||
'''
|
||||
file_client = opts['file_client']
|
||||
if opts.get('master_type') == 'disable' and file_client == 'remote':
|
||||
file_client = 'local'
|
||||
ptype = {
|
||||
'remote': AsyncRemotePillar,
|
||||
'local': AsyncPillar,
|
||||
}.get(opts['file_client'], AsyncPillar)
|
||||
}.get(file_client, AsyncPillar)
|
||||
return ptype(opts, grains, minion_id, saltenv, ext, functions=funcs,
|
||||
pillar=pillar, pillarenv=pillarenv)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue