Hi

We're using Ansible 2.8 and we're trying to remove a static route defined 
in a vrf, but even following documentation directives (setting state to 
absent), it doesn't work.

>From "show run" I see:
vrf context MIDDLE
  description MIDDLE VRF
...
  ip route 10.236.250.39/32 10.230.135.81 name xxxx 24

When I execute my code in dry run it says no change and:
ok: [nex4010.oob.mad.novumproject.com] => {
    "changed": false, 
    "commands": [], 
    "invocation": {
...
                {
                    "next_hop": "10.230.135.81", 
                    "pref": "default", 
                    "prefix": "10.236.250.39/32", 
                    "route_name": "cirte_li_prod", 
                    "state": "absent", 
                    "tag": "default", 
                    "track": null, 
                    "vrf": "default"
                }, 

And of course when I execute it in not dry-run mode, it simply doesn't 
execute it.

The Ansible task is:
- name: "Ensure VRF {{ item.key }} routes"
  connection: network_cli
  nxos_static_route:
    aggregate: "{{ item.value.routes | dict2items  | 
routes_params(item.key) }}"
  tags:
    - vrf
    - routing

And the routes_params task generates a list of routes that in this case is 
what I put before.

Is a bug or something that I'm doing incorrectly?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3580bfe6-36b8-4ad5-ab1e-baab85f535d5%40googlegroups.com.

Reply via email to