mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Merge pull request #14591 from sivel/issue/14541
Allow lookups to return python data structures
This commit is contained in:
@@ -420,7 +420,13 @@ class Templar:
|
|||||||
if wantlist:
|
if wantlist:
|
||||||
ran = wrap_var(ran)
|
ran = wrap_var(ran)
|
||||||
else:
|
else:
|
||||||
ran = UnsafeProxy(",".join(ran))
|
try:
|
||||||
|
ran = UnsafeProxy(",".join(ran))
|
||||||
|
except TypeError:
|
||||||
|
if isinstance(ran, list) and len(ran) == 1:
|
||||||
|
ran = wrap_var(ran[0])
|
||||||
|
else:
|
||||||
|
ran = wrap_var(ran)
|
||||||
|
|
||||||
return ran
|
return ran
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user