summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Jaiswal <sjaiswal@redhat.com>2019-11-13 01:21:16 +0530
committerMatt Davis <nitzmahone@users.noreply.github.com>2019-11-12 11:51:16 -0800
commit7ca3b677c463c80c0591d09e8fb3f4e721858157 (patch)
tree44b86cc386aa60c2ef689dcc7c7aa3c91cbc58ca
parentcdc6577395b71ef9692c0dad15ef9f47cff649c7 (diff)
downloadansible-7ca3b677c463c80c0591d09e8fb3f4e721858157.tar.gz
Backport PR to Fix ios_l2_interfaces skipping relevant L2 interfaces facts (#63893)
* Fix ios_l2_interfaces skipping relevant L2 interfaces facts (#63779) * fix bug 63777 * fix comment (cherry picked from commit d620a209a5935aff190e74057ad4e30fa9dcefb4) * changelog
-rw-r--r--changelogs/fragments/63779-ios_l2_interfaces-skipping-relevant-L2-interfaces-facts.yaml3
-rw-r--r--lib/ansible/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/changelogs/fragments/63779-ios_l2_interfaces-skipping-relevant-L2-interfaces-facts.yaml b/changelogs/fragments/63779-ios_l2_interfaces-skipping-relevant-L2-interfaces-facts.yaml
new file mode 100644
index 0000000000..174c0757f9
--- /dev/null
+++ b/changelogs/fragments/63779-ios_l2_interfaces-skipping-relevant-L2-interfaces-facts.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+- "Fix ios_l2_interfaces skipping relevant L2 interfaces facts(https://github.com/ansible/ansible/pull/63779)"
diff --git a/lib/ansible/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py b/lib/ansible/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py
index d175f31386..bddb273bad 100644
--- a/lib/ansible/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py
+++ b/lib/ansible/module_utils/network/ios/facts/l2_interfaces/l2_interfaces.py
@@ -83,7 +83,7 @@ class L2_InterfacesFacts(object):
if get_interface_type(intf) == 'unknown':
return {}
- if intf.lower().startswith('gi'):
+ if intf.upper()[:2] in ('HU', 'FO', 'TW', 'TE', 'GI', 'FA', 'ET', 'PO'):
# populate the facts from the configuration
config['name'] = normalize_interface(intf)