Handle top-level vars for include tasks to match v1 syntax

The "streamlined" syntax will be deprecated at some point in the future.

Fixes #11882
This commit is contained in:
James Cammarata 2015-08-06 17:19:16 -04:00
commit 5eb092b331
2 changed files with 26 additions and 1 deletions

View file

@ -65,6 +65,13 @@ class Base:
# and initialize the base attributes
self._initialize_base_attributes()
try:
from __main__ import display
self._display = display
except ImportError:
from ansible.utils.display import Display
self._display = Display()
# The following three functions are used to programatically define data
# descriptors (aka properties) for the Attributes of all of the playbook
# objects (tasks, blocks, plays, etc).