Do not allow addressing an import from handlers via notify. Fixes #48936 (#49317)

This commit is contained in:
Matt Martz 2018-11-29 13:50:07 -06:00 committed by GitHub
commit 77befcf5d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 34 additions and 1 deletions

View file

@ -402,7 +402,7 @@ class StrategyBase:
def parent_handler_match(target_handler, handler_name):
if target_handler:
if isinstance(target_handler, (TaskInclude, IncludeRole)):
if isinstance(target_handler, (TaskInclude, IncludeRole)) and not getattr(target_handler, 'statically_loaded', True):
try:
handler_vars = self._variable_manager.get_vars(play=iterator._play, task=target_handler)
templar = Templar(loader=self._loader, variables=handler_vars)