Skip to content

Commit

Permalink
Merge pull request #187 from mirceaulinic/issue-181
Browse files Browse the repository at this point in the history
Issue #181: Re-compile the Pillar after establishing the connection
  • Loading branch information
mirceaulinic committed Oct 28, 2020
2 parents da2bc92 + db7c42b commit 4756a50
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions salt_sproxy/_runners/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,17 @@ def gen_modules(self, initial_load=False): # pylint: disable=arguments-differ
# may contain other grains from different sources, e.g., roster.
loaded_grains = salt.loader.grains(self.opts, proxy=self.proxy)
self.opts['grains'] = salt.utils.dictupdate.merge(grains, loaded_grains)
if self.opts.get('proxy_load_pillar', True):
self.opts['pillar'] = salt.pillar.get_pillar(
self.opts,
self.opts['grains'],
self.opts['id'],
saltenv=self.opts['saltenv'],
pillarenv=self.opts.get('pillarenv'),
).compile_pillar()
self.functions.pack['__opts__'] = self.opts
self.functions.pack['__grains__'] = copy.deepcopy(self.opts['grains'])
self.functions.pack['__pillar__'] = copy.deepcopy(self.opts['pillar'])
self.grains_cache = copy.deepcopy(self.opts['grains'])

if self.opts.get('invasive_targeting', False):
Expand Down

0 comments on commit 4756a50

Please sign in to comment.