mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #40124 from alexbleotu/proxy_dunder_injection-gh
Proxy dunder injection gh
This commit is contained in:
commit
cc69f79e26
@ -1559,6 +1559,10 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
||||
|
||||
self.loaded = True
|
||||
|
||||
def reload_modules(self):
|
||||
self.loaded_files = set()
|
||||
self._load_all()
|
||||
|
||||
def _apply_outputter(self, func, mod):
|
||||
'''
|
||||
Apply the __outputter__ variable to the functions
|
||||
|
@ -3109,6 +3109,9 @@ class ProxyMinion(Minion):
|
||||
self.utils = salt.loader.utils(self.opts, proxy=self.proxy)
|
||||
self.proxy.pack['__utils__'] = self.utils
|
||||
|
||||
# Reload all modules so all dunder variables are injected
|
||||
self.proxy.reload_modules()
|
||||
|
||||
# Start engines here instead of in the Minion superclass __init__
|
||||
# This is because we need to inject the __proxy__ variable but
|
||||
# it is not setup until now.
|
||||
|
Loading…
Reference in New Issue
Block a user