mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 06:30:19 -07:00
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:
parent
c3ce140dd2
commit
5266679964
15 changed files with 44 additions and 42 deletions
|
@ -42,6 +42,11 @@ PATH_CACHE = {}
|
|||
PLUGIN_PATH_CACHE = {}
|
||||
_basedirs = []
|
||||
|
||||
# FIXME: the _basedirs code may be dead, and no longer needed, as
|
||||
# we now use add_directory for all plugin types here instead
|
||||
# of relying on this global variable (which also causes problems
|
||||
# with forked processes). See the Playbook() and Role() classes
|
||||
# for how we now ue get_all_plugin_loaders() below.
|
||||
def push_basedir(basedir):
|
||||
# avoid pushing the same absolute dir more than once
|
||||
basedir = to_unicode(os.path.realpath(basedir))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue