mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #43072 from darcoli/pillarenv_from_saltenv_states
Consider saltenv from kwargs with pillarenv_from_saltenv
This commit is contained in:
commit
11b97d588c
1 changed files with 4 additions and 4 deletions
|
@ -273,12 +273,12 @@ def _get_opts(**kwargs):
|
|||
else:
|
||||
opts['environment'] = kwargs['saltenv']
|
||||
|
||||
if 'pillarenv' in kwargs:
|
||||
pillarenv = kwargs['pillarenv']
|
||||
if 'pillarenv' in kwargs or opts.get('pillarenv_from_saltenv', False):
|
||||
pillarenv = kwargs.get('pillarenv') or kwargs.get('saltenv')
|
||||
if pillarenv is not None and not isinstance(pillarenv, six.string_types):
|
||||
opts['pillarenv'] = str(kwargs['pillarenv'])
|
||||
opts['pillarenv'] = str(pillarenv)
|
||||
else:
|
||||
opts['pillarenv'] = kwargs['pillarenv']
|
||||
opts['pillarenv'] = pillarenv
|
||||
|
||||
return opts
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue