Open aoforb opened 1 month ago
Running the below task fails
- name: Gather IOS facts cisco.ios.ios_facts: gather_subset: interfaces
IOS Facts
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 ---------------------------------------- ------- ansible.netcommon 6.0.0 ansible.posix 1.5.4 ansible.utils 3.1.0 cisco.ios 6.1.3
N/A
Ubuntu 22.02
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
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.
KeyError
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
See above
SUMMARY
Running the below task fails
ISSUE TYPE
COMPONENT NAME
IOS Facts
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 22.02
STEPS TO REPRODUCE
Configure a sub interface on a Cisco 9300 switch running 17.09.04a, then negate it.
Then run the task
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