From f03e84592051187040a2eca4cbe731a6c8bda8a5 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Mon, 25 Feb 2013 15:09:44 +0100 Subject: [PATCH] Allow hyphens in complex variables Primarily to support ${hostvars.hostname-with-hyphens.}. --- 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 000062a1fa..c17eab48a8 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -139,7 +139,7 @@ def _varFind(basedir, text, vars, lookup_fatal, depth, expand_lists): brace_level += 1 elif is_complex and text[end] == '}': brace_level -= 1 - elif is_complex and text[end] in ('$', '[', ']'): + elif is_complex and text[end] in ('$', '[', ']', '-'): pass elif is_complex and text[end] == '.': if brace_level == 1: