mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 17:53:10 +00:00
The former match for a section header included hosts that began with a range. (#17225)
Checking that the line ends with "]" narrows that window somewhat, Fixes #15331
This commit is contained in:
committed by
Brian Coca
parent
5d865ec1ef
commit
89f91b1cd7
@@ -124,7 +124,7 @@ class InventoryParser(object):
|
||||
del pending_declarations[groupname]
|
||||
|
||||
continue
|
||||
elif line.startswith('['):
|
||||
elif line.startswith('[') and line.endswith(']'):
|
||||
self._raise_error("Invalid section entry: '%s'. Please make sure that there are no spaces" % line + \
|
||||
"in the section entry, and that there are no other invalid characters")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user