mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Allow hyphens in complex variables
Primarily to support ${hostvars.hostname-with-hyphens.<var>}.
This commit is contained in:
@@ -139,7 +139,7 @@ def _varFind(basedir, text, vars, lookup_fatal, depth, expand_lists):
|
|||||||
brace_level += 1
|
brace_level += 1
|
||||||
elif is_complex and text[end] == '}':
|
elif is_complex and text[end] == '}':
|
||||||
brace_level -= 1
|
brace_level -= 1
|
||||||
elif is_complex and text[end] in ('$', '[', ']'):
|
elif is_complex and text[end] in ('$', '[', ']', '-'):
|
||||||
pass
|
pass
|
||||||
elif is_complex and text[end] == '.':
|
elif is_complex and text[end] == '.':
|
||||||
if brace_level == 1:
|
if brace_level == 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user