mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Speed up salt.matcher.confirm_top by using __context__
This commit is contained in:
parent
eff969d280
commit
4923679536
1 changed files with 5 additions and 1 deletions
|
@ -22,7 +22,11 @@ def confirm_top(match, data, nodegroups=None):
|
|||
if "match" in item:
|
||||
matcher = item["match"]
|
||||
|
||||
matchers = salt.loader.matchers(__opts__)
|
||||
if "matchers" in __context__:
|
||||
matchers = __context__["matchers"]
|
||||
else:
|
||||
matchers = salt.loader.matchers(__opts__)
|
||||
__context__["matchers"] = matchers
|
||||
funcname = matcher + "_match.match"
|
||||
if matcher == "nodegroup":
|
||||
return matchers[funcname](match, nodegroups)
|
||||
|
|
Loading…
Add table
Reference in a new issue