From 8edda38c6134d512a930f7e6a70d1715f5a2e475 Mon Sep 17 00:00:00 2001 From: Stoned Elipot Date: Tue, 12 Mar 2013 05:01:45 +0100 Subject: [PATCH] exception safe list/tuple replacing for non-str values --- lib/ansible/utils/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index fd135b0b39..8e134f403e 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -214,7 +214,7 @@ def varReplace(basedir, raw, vars, lookup_fatal=True, depth=0, expand_lists=Fals replacement = m['replacement'] if expand_lists and isinstance(replacement, (list, tuple)): - replacement = ",".join(replacement) + replacement = ",".join([str(x) for x in replacement]) if isinstance(replacement, (str, unicode)): replacement = varReplace(basedir, replacement, vars, lookup_fatal, depth=depth+1, expand_lists=expand_lists) if replacement is None: