mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-11 11:41:32 -07:00
nxos_snmp_location integration test clean up (#39375)
This commit is contained in:
parent
c9245439dc
commit
4c1a9898fd
1 changed files with 25 additions and 10 deletions
|
@ -7,17 +7,13 @@
|
||||||
nxos_snmp_location: &remove
|
nxos_snmp_location: &remove
|
||||||
location: Test
|
location: Test
|
||||||
state: absent
|
state: absent
|
||||||
timeout: 60
|
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
ignore_errors: yes
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
- name: Configure snmp location
|
||||||
- name: Configure snmp host
|
|
||||||
nxos_snmp_location: &config
|
nxos_snmp_location: &config
|
||||||
location: Test
|
location: Testing
|
||||||
state: present
|
state: present
|
||||||
timeout: 60
|
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -33,17 +29,36 @@
|
||||||
that:
|
that:
|
||||||
- "result.changed == false"
|
- "result.changed == false"
|
||||||
|
|
||||||
always:
|
- name: Change snmp location
|
||||||
- name: Cleanup
|
nxos_snmp_location: &config1
|
||||||
|
location: Test
|
||||||
|
state: present
|
||||||
|
provider: "{{ connection }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- assert: *true
|
||||||
|
|
||||||
|
- name: Idempotence Check
|
||||||
|
nxos_snmp_location: *config1
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- assert: *false
|
||||||
|
|
||||||
|
- name: remove snmp location
|
||||||
nxos_snmp_location: *remove
|
nxos_snmp_location: *remove
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
|
||||||
- name: Cleanup Idempotence
|
- name: Remove Idempotence
|
||||||
nxos_snmp_location: *remove
|
nxos_snmp_location: *remove
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert: *false
|
- assert: *false
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: Cleanup
|
||||||
|
nxos_snmp_location: *remove
|
||||||
|
register: result
|
||||||
|
|
||||||
- debug: msg="END connection={{ ansible_connection }} nxos_snmp_location sanity test"
|
- debug: msg="END connection={{ ansible_connection }} nxos_snmp_location sanity test"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue