Allow hyphens in complex variables

Primarily to support ${hostvars.hostname-with-hyphens.<var>}.
parent 50c1c060
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment