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

Short name interface_split function #243

Open
ryanmerolle opened this issue Nov 7, 2019 · 0 comments
Open

Short name interface_split function #243

ryanmerolle opened this issue Nov 7, 2019 · 0 comments

Comments

@ryanmerolle
Copy link

ISSUE TYPE

  • Feature Idea

ANSIBLE VERSION

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

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'

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

1 participant