mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
If expand_lists is true, make lookup plugin result into a string
Fixes #2196.
This commit is contained in:
parent
7e0ee6809c
commit
1df56c07d3
1 changed files with 2 additions and 0 deletions
|
@ -173,6 +173,8 @@ def _varFind(basedir, text, vars, lookup_fatal, depth, expand_lists):
|
||||||
if instance is not None:
|
if instance is not None:
|
||||||
try:
|
try:
|
||||||
replacement = instance.run(args, inject=vars)
|
replacement = instance.run(args, inject=vars)
|
||||||
|
if expand_lists:
|
||||||
|
replacement = u",".join([unicode(x) for x in replacement])
|
||||||
except errors.AnsibleError:
|
except errors.AnsibleError:
|
||||||
if not lookup_fatal:
|
if not lookup_fatal:
|
||||||
replacement = None
|
replacement = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue