From 1793cad07b110806dd36e6b65c0b4834f12b56a9 Mon Sep 17 00:00:00 2001 From: Steve C Date: Tue, 8 Jan 2019 09:11:43 -0500 Subject: [PATCH] fix ip address tokenization bug in eos_static_route module (#43151) --- lib/ansible/modules/network/eos/eos_static_route.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/eos/eos_static_route.py b/lib/ansible/modules/network/eos/eos_static_route.py index 44a8f58a615..c0ccac67445 100644 --- a/lib/ansible/modules/network/eos/eos_static_route.py +++ b/lib/ansible/modules/network/eos/eos_static_route.py @@ -162,13 +162,13 @@ def map_config_to_obj(module): lines = out.splitlines() for line in lines: obj = {} - add_match = re.search(r'ip route (\S+)', line, re.M) + add_match = re.search(r'ip route ([\d\./]+)', line, re.M) if add_match: address = add_match.group(1) if is_address(address): obj['address'] = address - hop_match = re.search(r'ip route {0} (\S+)'.format(address), line, re.M) + hop_match = re.search(r'ip route {0} ([\d\./]+)'.format(address), line, re.M) if hop_match: hop = hop_match.group(1) if is_hop(hop):