Implimend the disable_modules feature

This commit is contained in:
Thomas S Hatch 2011-03-14 22:30:58 -06:00
parent 5bc5591e8e
commit 49d611e728
2 changed files with 3 additions and 0 deletions

View file

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

View file

@ -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('_'):