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?