mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -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
|
@ -33,8 +33,9 @@ class LookupModule(LookupBase):
|
|||
raise AnsibleError(
|
||||
"subelements lookup expects a list of two or three items, "
|
||||
+ msg)
|
||||
terms = listify_lookup_plugin_terms(terms, variables, loader=self._loader)
|
||||
terms[0] = listify_lookup_plugin_terms(terms[0], variables, loader=self._loader)
|
||||
|
||||
terms = listify_lookup_plugin_terms(terms, templar=self._templar, loader=self._loader)
|
||||
terms[0] = listify_lookup_plugin_terms(terms[0], templar=self._templar, loader=self._loader)
|
||||
|
||||
# check lookup terms - check number of terms
|
||||
if not isinstance(terms, list) or not 2 <= len(terms) <= 3:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue