Make __grains__ and __salt__ available for log_handler modules

Refs #26390
This commit is contained in:
Pedro Algarvio 2015-08-17 20:28:51 +01:00
parent 740e7aa82f
commit 54ad6532f2

View File

@ -449,6 +449,10 @@ def log_handlers(opts):
:param dict opts: The Salt options dictionary :param dict opts: The Salt options dictionary
''' '''
pack = {
'__grains__': grains(opts),
'__salt__': minion_mods(opts)
}
ret = LazyLoader(_module_dirs(opts, ret = LazyLoader(_module_dirs(opts,
'log_handlers', 'log_handlers',
'log_handlers', 'log_handlers',
@ -456,6 +460,7 @@ def log_handlers(opts):
base_path=os.path.join(SALT_BASE_PATH, 'log')), base_path=os.path.join(SALT_BASE_PATH, 'log')),
opts, opts,
tag='log_handlers', tag='log_handlers',
pack=pack
) )
return FilterDictWrapper(ret, '.setup_handlers') return FilterDictWrapper(ret, '.setup_handlers')