mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add __cli for master processes
This commit is contained in:
parent
c1dc42e67e
commit
1b1c29bf62
2 changed files with 3 additions and 1 deletions
|
@ -3571,6 +3571,8 @@ def apply_master_config(overrides=None, defaults=None):
|
|||
if overrides:
|
||||
opts.update(overrides)
|
||||
|
||||
opts['__cli'] = os.path.basename(sys.argv[0])
|
||||
|
||||
if len(opts['sock_dir']) > len(opts['cachedir']) + 10:
|
||||
opts['sock_dir'] = os.path.join(opts['cachedir'], '.salt-unix')
|
||||
|
||||
|
|
|
@ -280,7 +280,7 @@ def _get_opts(**kwargs):
|
|||
|
||||
|
||||
def _get_initial_pillar(opts):
|
||||
return __pillar__ if __opts__['__cli'] == 'salt-call' \
|
||||
return __pillar__ if __opts__.get('__cli', None) == 'salt-call' \
|
||||
and opts['pillarenv'] == __opts__['pillarenv'] \
|
||||
else None
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue