mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Implimend the disable_modules feature
This commit is contained in:
parent
5bc5591e8e
commit
49d611e728
2 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,7 @@ def minion_config(path):
|
|||
'pki_dir': '/etc/salt/pki',
|
||||
'hostname': socket.getfqdn(),
|
||||
'cachedir': '/var/cache/salt',
|
||||
'disable_modules': [],
|
||||
'open_mode': False,
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ class Minion(object):
|
|||
or fn_.endswith('.pyc'):
|
||||
mods.add(fn_[:fn_.rindex('.')])
|
||||
for mod in mods:
|
||||
if self.opts['disable_modules'].count(mod):
|
||||
continue
|
||||
module = importlib.import_module('salt.modules.' + mod)
|
||||
for attr in dir(module):
|
||||
if attr.startswith('_'):
|
||||
|
|
Loading…
Add table
Reference in a new issue