mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Match VLAN ID as whole line instead of searching for digits in line (#51019)
Searching for digits somewhere in the output line will also match VLAN name (lines) starting with digits. Fixes issue #50998
This commit is contained in:
parent
22d914a888
commit
b1c295386f
1 changed files with 1 additions and 1 deletions
|
@ -580,7 +580,7 @@ def map_config_to_obj(module):
|
|||
if len(line) > 0:
|
||||
line = line.strip()
|
||||
if line[0].isdigit():
|
||||
match = re.search(r'(\d+)', line, re.M)
|
||||
match = re.search(r'^(\d+)$', line, re.M)
|
||||
if match:
|
||||
v = match.group(1)
|
||||
pos1 = splitted_line.index(v)
|
||||
|
|
Loading…
Reference in a new issue