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

Validate required prefix variable is not empty #58195

wants to merge 1 commit into
base: devel


None yet
3 participants
Copy link

commented Jun 21, 2019


This fixes a validation bug with the nxos_static_route module, where it accepts an empty prefix variable passed, even though it's required.

Currently, if an empty string is passed as the prefix, this module attempts to configure the following line on NX-OS switches:

ip route /32 x.x.x.x

where x.x.x.x is the next_hop passed. This throws an invalid command error on the switch.

  • Bugfix Pull Request



To recreate the issue, call the following function:

- nxos_static_route:
    state: present
    prefix: ''
    next_hop: ''

Error output:

"msg": "ip route /32\r\r\n                                ^\r\n% Invalid ip address at '^' marker.\r\n\rswitch-hostname(config)# "

This comment has been minimized.


This comment has been minimized.

Copy link

commented Jun 21, 2019

@v1tal3, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see

click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.