Open ryanmerolle opened 4 years ago
ansible 2.9.0 config file = None configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/user/.local/lib/python3.6/site-packages/ansible executable location = /home/user/.local/bin/ansible python version = 3.6.8 (default, Oct 7 2019, 12:59:55) [GCC 8.3.0] ansible-network.network-engine, v2.7.5
All
Nearly all Network OS report a short name for interfaces. It would be useful for interface_split or a similar filter to spit such short names out given a full interface name.
{{ 'Ethernet1/1' | interface_split('shortname') }} returns 'Et1/1' {{ 'Loopback0' | interface_split('shortname') }} returns 'Lo0' {{ 'TenGigabitEthernet1/0/1' | interface_split('shortname') }} returns 'Te1/0/1' {{ 'Tunnel1' | interface_split('shortname') }} returns 'Tu1'
ISSUE TYPE
ANSIBLE VERSION
Network OS
All
SUMMARY
Nearly all Network OS report a short name for interfaces. It would be useful for interface_split or a similar filter to spit such short names out given a full interface name.
EXPECTED RESULTS
{{ 'Ethernet1/1' | interface_split('shortname') }} returns 'Et1/1' {{ 'Loopback0' | interface_split('shortname') }} returns 'Lo0' {{ 'TenGigabitEthernet1/0/1' | interface_split('shortname') }} returns 'Te1/0/1' {{ 'Tunnel1' | interface_split('shortname') }} returns 'Tu1'