Move post_validate for tasks after checking for an include

Simplifies logic and prevents us from accidentally post_validating
an include that would otherwise be skipped due to tags causing a
problem because of potentially missing variables.

Fixes #12793
This commit is contained in:
James Cammarata 2015-10-19 13:40:47 -04:00
parent 1cfd941179
commit 892d9b8dfb
2 changed files with 11 additions and 9 deletions

View file

@ -401,6 +401,7 @@ class StrategyBase:
try:
data = self._loader.load_from_file(included_file._filename)
self._tqm.send_callback('v2_playbook_on_include', included_file)
if data is None:
return []
except AnsibleError as e: