Disallow non-proxyenabled modules and grains

This commit is contained in:
C. R. Oldham 2016-01-12 07:52:32 -07:00
parent 46681658e0
commit 5ecf85017b
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -23,6 +23,7 @@ import salt.ext.six as six
log = logging.getLogger(__name__)
__proxyenabled__ = ['*']
def _auth():
'''