mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Disallow non-proxyenabled modules and grains
This commit is contained in:
parent
46681658e0
commit
5ecf85017b
2 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue