mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Disallow non-proxyenabled modules and grains
This commit is contained in:
parent
46681658e0
commit
5ecf85017b
@ -1223,10 +1223,10 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
||||
# containing the names of the proxy types that the module supports.
|
||||
#
|
||||
# Render modules and state modules are OK though
|
||||
if 'proxymodule' in self.opts:
|
||||
if 'proxy' in self.opts:
|
||||
if self.tag not in ['render', 'states', 'utils']:
|
||||
if not hasattr(mod, '__proxyenabled__') or \
|
||||
(self.opts['proxymodule'].loaded_base_name not in mod.__proxyenabled__ and
|
||||
(self.opts['proxy']['proxytype'] not in mod.__proxyenabled__ and
|
||||
'*' not in mod.__proxyenabled__):
|
||||
err_string = 'not a proxy_minion enabled module'
|
||||
self.missing_modules[module_name] = err_string
|
||||
|
@ -23,6 +23,7 @@ import salt.ext.six as six
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
__proxyenabled__ = ['*']
|
||||
|
||||
def _auth():
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user