mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #46493 from terminalmage/issue46207
salt-call: don't re-use initial pillar if CLI overrides passed
This commit is contained in:
commit
0e90c8ca6f
1 changed files with 5 additions and 3 deletions
|
@ -703,8 +703,12 @@ class State(object):
|
|||
except AttributeError:
|
||||
pillar_enc = str(pillar_enc).lower()
|
||||
self._pillar_enc = pillar_enc
|
||||
if initial_pillar:
|
||||
if initial_pillar and not self._pillar_override:
|
||||
self.opts['pillar'] = initial_pillar
|
||||
else:
|
||||
# Compile pillar data
|
||||
self.opts['pillar'] = self._gather_pillar()
|
||||
# Reapply overrides on top of compiled pillar
|
||||
if self._pillar_override:
|
||||
self.opts['pillar'] = salt.utils.dictupdate.merge(
|
||||
self.opts['pillar'],
|
||||
|
@ -712,8 +716,6 @@ class State(object):
|
|||
self.opts.get('pillar_source_merging_strategy', 'smart'),
|
||||
self.opts.get('renderer', 'yaml'),
|
||||
self.opts.get('pillar_merge_lists', False))
|
||||
else:
|
||||
self.opts['pillar'] = self._gather_pillar()
|
||||
self.state_con = context or {}
|
||||
self.load_modules()
|
||||
self.active = set()
|
||||
|
|
Loading…
Add table
Reference in a new issue