mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-29 15:39:20 +00:00
nxos_static_route DI module (#33797)
* nxos_static_route DI module Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * add version_added
This commit is contained in:
parent
7381554e42
commit
4a4da2b774
2 changed files with 132 additions and 35 deletions
|
|
@ -45,6 +45,47 @@
|
|||
|
||||
- assert: *false
|
||||
|
||||
- name: configure static route(aggregate)
|
||||
nxos_static_route: &conf_agg
|
||||
aggregate:
|
||||
- { prefix: "192.168.22.64/24", next_hop: "3.3.3.3" }
|
||||
- { prefix: "192.168.24.64/24", next_hop: "3.3.3.3" }
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
|
||||
- name: configure static route aggregate(Idempotence)
|
||||
nxos_static_route: *conf_agg
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
- name: remove static route aggregate
|
||||
nxos_static_route: &remove_agg
|
||||
aggregate:
|
||||
- { prefix: "192.168.22.64/24", next_hop: "3.3.3.3" }
|
||||
- { prefix: "192.168.24.64/24", next_hop: "3.3.3.3" }
|
||||
state: absent
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
|
||||
- name: remove static route aggregate(Idempotence)
|
||||
nxos_static_route: *remove_agg
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
always:
|
||||
- name: remove static route
|
||||
nxos_static_route:
|
||||
|
|
@ -58,4 +99,13 @@
|
|||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: remove static route aggregate
|
||||
nxos_static_route:
|
||||
aggregate:
|
||||
- { prefix: "192.168.22.64/24", next_hop: "3.3.3.3" }
|
||||
- { prefix: "192.168.24.64/24", next_hop: "3.3.3.3" }
|
||||
state: absent
|
||||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_static_route sanity test"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue