Allow hyphens in complex variables

Primarily to support ${hostvars.hostname-with-hyphens.<var>}.
This commit is contained in:
Daniel Hokka Zakrisson 2013-02-25 15:09:44 +01:00
parent 50c1c06088
commit f03e845920

View file

@ -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: