diff --git a/lib/ansible/modules/network/ios/ios_static_route.py b/lib/ansible/modules/network/ios/ios_static_route.py index 5e8a8fe676..ed3c08c0cb 100644 --- a/lib/ansible/modules/network/ios/ios_static_route.py +++ b/lib/ansible/modules/network/ios/ios_static_route.py @@ -137,6 +137,11 @@ def map_config_to_obj(module): for r in match.group(1).splitlines(): splitted_line = r.split() + code = splitted_line[0] + + if code != 'M': + continue + cidr = ip_network(to_text(splitted_line[1])) prefix = str(cidr.network_address) mask = str(cidr.netmask)