Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS Facts module fails with "deleted" interface status #1057

Open
aoforb opened this issue Apr 18, 2024 · 0 comments
Open

IOS Facts module fails with "deleted" interface status #1057

aoforb opened this issue Apr 18, 2024 · 0 comments
Assignees

Comments

@aoforb
Copy link

aoforb commented Apr 18, 2024

SUMMARY

Running the below task fails

- name: Gather IOS facts
  cisco.ios.ios_facts:
    gather_subset: interfaces

image

image

ISSUE TYPE
  • Bug Report
COMPONENT NAME

IOS Facts

ANSIBLE VERSION
ansible [core 2.16.6]
  python version = 3.10.14 (main, Apr  6 2024, 18:45:05) [GCC 9.4.0]
  jinja version = 3.1.3
  libyaml = True
COLLECTION VERSION
Collection                               Version
---------------------------------------- -------
ansible.netcommon                        6.0.0  
ansible.posix                            1.5.4  
ansible.utils                            3.1.0  
cisco.ios                                6.1.3  
CONFIGURATION
N/A
OS / ENVIRONMENT

Ubuntu 22.02

STEPS TO REPRODUCE

Configure a sub interface on a Cisco 9300 switch running 17.09.04a, then negate it.

interface GigabitEthernet2/0/32
 no switchport
interface GigabitEthernet2/0/32.1874
no interface GigabitEthernet2/0/32.1874

Then run the task

- name: Gather IOS facts
  cisco.ios.ios_facts:
    gather_subset: interfaces
EXPECTED RESULTS

Ansible should ignore deleted interfaces or at least include within facts and mark as 'deleted'

Looks like the "GigabitEthernet2/0/32.1874" is used as a dict key and is missing from the final facts dict and failing on a KeyError exception.

Deleted interfaces are only cleared by rebooting the switch, its been this way for years so Ansible should account for this.

See
here

and here

also here

ACTUAL RESULTS

See above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants