mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
fix nxos_udld issues (#37418)
This commit is contained in:
parent
995f6c7689
commit
05b266cc66
2 changed files with 76 additions and 63 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
- set_fact: udld_run="true"
|
||||
- set_fact: udld_run="false"
|
||||
when: (( platform is search('N9K-F')) and (imagetag and ( imagetag is version('F3', 'lt'))))
|
||||
when: ((platform is search('N9K-F')) and (imagetag and (imagetag is version_compare('F3', 'lt'))))
|
||||
- set_fact: udld_run="false"
|
||||
when: titanium
|
||||
|
||||
|
@ -16,14 +16,9 @@
|
|||
state: enabled
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- name: Reset udld
|
||||
nxos_udld:
|
||||
reset: True
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- name: Ensure udld agg mode is globally disabled and msg time is 20
|
||||
- name: Configure udld
|
||||
nxos_udld: &conf1
|
||||
aggressive: disabled
|
||||
aggressive: enabled
|
||||
msg_time: 20
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
@ -32,7 +27,7 @@
|
|||
that:
|
||||
- "result.changed == true"
|
||||
|
||||
- name: "Conf1 Idempotence"
|
||||
- name: "Check Idempotence"
|
||||
nxos_udld: *conf1
|
||||
register: result
|
||||
|
||||
|
@ -40,22 +35,59 @@
|
|||
that:
|
||||
- "result.changed == false"
|
||||
|
||||
- name: Reset udld
|
||||
nxos_udld:
|
||||
reset: True
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- name: Ensure udld agg mode is globally enabled and msg time is 15
|
||||
- name: Configure udld2
|
||||
nxos_udld: &conf2
|
||||
aggressive: enabled
|
||||
msg_time: 15
|
||||
aggressive: disabled
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "conf2 Idempotence"
|
||||
- name: "Check Idempotence"
|
||||
nxos_udld: *conf2
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
- name: Configure udld3
|
||||
nxos_udld: &conf3
|
||||
msg_time: default
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "Check Idempotence"
|
||||
nxos_udld: *conf3
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
- name: Configure udld again
|
||||
nxos_udld: *conf1
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: Remove udld config
|
||||
nxos_udld: &conf4
|
||||
state: absent
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
- name: "Check Idempotence"
|
||||
nxos_udld: *conf4
|
||||
register: result
|
||||
|
||||
- assert: *false
|
||||
|
||||
when: udld_run
|
||||
|
||||
always:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue