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

nxos_static_route issues #43079

Closed
dmurarasu opened this Issue Jul 20, 2018 · 3 comments

Comments

4 participants
@dmurarasu

dmurarasu commented Jul 20, 2018

SUMMARY

When you use nxos_static_route in check mode it still changes device config.

If you specify vrf it also creates the vrf (I know other modules warn you if the vrf doesn't exit rather than creating it so maybe the module should check if vrf exists and fail if vrf is not configured on device).

It would be good to add track parameter option to the module but that's feature req not an issue.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

nxos_static_route

ANSIBLE VERSION
ansible 2.7.0.dev0
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.5 (default, Apr 10 2018, 17:08:37) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
CONFIGURATION
OS / ENVIRONMENT

Ansible Server: CentOS Linux release 7.5.1804
Device: N9K running NXOS: version 7.0(3)I6(1)

STEPS TO REPRODUCE
---
 name: configure device
  hosts: sw
  connection: network_cli  
  tasks:
    - nxos_static_route:
        prefix: 10.55.12.0/24
        state: present
        next_hop: 10.11.1.1
        vrf: test
EXPECTED RESULTS

No change on device

ACTUAL RESULTS

ansible-playbook -i hosts check.yaml -v --check
PLAY [configure device] ************************************************************************************************************************************************************************

TASK [nxos_static_route] ***********************************************************************************************************************************************************************
changed: [192.168.16.3] => {"changed": true, "commands": ["vrf context test", "ip route 10.55.12.0/24 10.11.1.1"]}

PLAY RECAP *************************************************************************************************************************************************************************************
192.168.16.3 : ok=1 changed=1 unreachable=0 failed=0

ansible-playbook -i hosts check.yaml -v --check
PLAY [configure device] ************************************************************************************************************************************************************************

TASK [nxos_static_route] ***********************************************************************************************************************************************************************
ok: [192.168.16.3] => {"changed": false, "commands": []}

PLAY RECAP *************************************************************************************************************************************************************************************
192.168.16.3 : ok=1 changed=0 unreachable=0 failed=0

You can see from the above that running it twice confirms change was made even if check mode is used.
device config after running the above:
vrf context test
ip route 10.55.12.0/24 10.11.1.1


@ansibot

This comment has been minimized.

Show comment
Hide comment
@ansibot

ansibot Jul 20, 2018

Contributor

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

Contributor

ansibot commented Jul 20, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot

This comment has been minimized.

Show comment
Hide comment
@trishnaguha

This comment has been minimized.

Show comment
Hide comment
@trishnaguha

trishnaguha Aug 16, 2018

Member

resolved_by_pr #44252

Member

trishnaguha commented Aug 16, 2018

resolved_by_pr #44252

@trishnaguha trishnaguha added this to Done in Networking Bugs Sep 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment