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:
|
||||
try:
|
||||
replacement = instance.run(args, inject=vars)
|
||||
if expand_lists:
|
||||
replacement = u",".join([unicode(x) for x in replacement])
|
||||
except errors.AnsibleError:
|
||||
if not lookup_fatal:
|
||||
replacement = None
|
||||
|
|
Loading…
Reference in a new issue