mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Backport feature allowing proxy config to live in pillar OR /etc/salt/proxy.
This commit is contained in:
parent
9e78ddc80e
commit
689d95b10f
1 changed files with 7 additions and 5 deletions
|
@ -3023,15 +3023,17 @@ class ProxyMinion(Minion):
|
|||
pillarenv=self.opts.get('pillarenv'),
|
||||
).compile_pillar()
|
||||
|
||||
if 'proxy' not in self.opts['pillar']:
|
||||
errmsg = 'No proxy key found in pillar for id '+self.opts['id']+'. '+\
|
||||
'Check your pillar configuration and contents. Salt-proxy aborted.'
|
||||
if 'proxy' not in self.opts['pillar'] and 'proxy' not in self.opts::
|
||||
errmsg = 'No proxy key found in pillar or config for id '+self.opts['id']+'. '+\
|
||||
'Check your pillar/opts configuration and contents. Salt-proxy aborted.'
|
||||
log.error(errmsg)
|
||||
self._running = False
|
||||
raise SaltSystemExit(code=-1, msg=errmsg)
|
||||
|
||||
fq_proxyname = self.opts['pillar']['proxy']['proxytype']
|
||||
self.opts['proxy'] = self.opts['pillar']['proxy']
|
||||
if 'proxy' not in self.opts:
|
||||
self.opts['proxy'] = self.opts['pillar']['proxy']
|
||||
|
||||
fq_proxyname = self.opts['proxy']['proxytype']
|
||||
|
||||
# Need to load the modules so they get all the dunder variables
|
||||
self.functions, self.returners, self.function_errors, self.executors = self._load_modules()
|
||||
|
|
Loading…
Add table
Reference in a new issue