mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
use dictupdate.merge instead of dict.update to merge CLI pillar overrides
Fixes #18429.
This commit is contained in:
parent
1d9321d043
commit
db31732137
@ -723,7 +723,13 @@ class Pillar(object):
|
||||
return pillar, errors
|
||||
ext = None
|
||||
# Bring in CLI pillar data
|
||||
pillar.update(self.pillar_override)
|
||||
if self.pillar_override and isinstance(self.pillar_override, dict):
|
||||
pillar = merge(pillar,
|
||||
self.pillar_override,
|
||||
self.merge_strategy,
|
||||
self.opts.get('renderer', 'yaml'),
|
||||
self.opts.get('pillar_merge_lists', False))
|
||||
|
||||
for run in self.opts['ext_pillar']:
|
||||
if not isinstance(run, dict):
|
||||
errors.append('The "ext_pillar" option is malformed')
|
||||
@ -802,6 +808,14 @@ class Pillar(object):
|
||||
for error in errors:
|
||||
log.critical('Pillar render error: {0}'.format(error))
|
||||
pillar['_errors'] = errors
|
||||
|
||||
if self.pillar_override and isinstance(self.pillar_override, dict):
|
||||
pillar = merge(pillar,
|
||||
self.pillar_override,
|
||||
self.merge_strategy,
|
||||
self.opts.get('renderer', 'yaml'),
|
||||
self.opts.get('pillar_merge_lists', False))
|
||||
|
||||
return pillar
|
||||
|
||||
|
||||
|
@ -649,8 +649,6 @@ class State(object):
|
||||
pillarenv=self.opts.get('pillarenv')
|
||||
)
|
||||
ret = pillar.compile_pillar()
|
||||
if self._pillar_override and isinstance(self._pillar_override, dict):
|
||||
ret.update(self._pillar_override)
|
||||
return ret
|
||||
|
||||
def _mod_init(self, low):
|
||||
|
Loading…
Reference in New Issue
Block a user