Use templar all the way down

Fixes bugs related to creating Templar() objects on the fly, where
the shared loader objects (serialized to TaskExecutor) aren't used
so information loaded into plugin loaders after forking is lost.

Fixes #11815
This commit is contained in:
James Cammarata 2015-08-04 12:10:23 -04:00
commit 5266679964
15 changed files with 44 additions and 42 deletions

View file

@ -37,7 +37,7 @@ from ansible.playbook.helpers import load_list_of_blocks
from ansible.playbook.role.include import RoleInclude
from ansible.playbook.role.metadata import RoleMetadata
from ansible.playbook.taggable import Taggable
from ansible.plugins import get_all_plugin_loaders, push_basedir
from ansible.plugins import get_all_plugin_loaders
from ansible.utils.vars import combine_vars
@ -142,8 +142,6 @@ class Role(Base, Become, Conditional, Taggable):
self._variable_manager = role_include.get_variable_manager()
self._loader = role_include.get_loader()
push_basedir(self._role_path)
if parent_role:
self.add_parent(parent_role)