1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add idempotency test to delete aggregate of iosxr users (#27228)

This commit is contained in:
Ricardo Carrillo Cruz 2017-07-24 13:50:34 +02:00 committed by GitHub
parent 2dc5066f83
commit 4ad022b622

View file

@ -64,7 +64,7 @@
- 'result.changed == false'
- 'result.commands | length == 0'
- name: tearDown
- name: Delete collection of users
iosxr_user:
users:
- name: ansibletest1
@ -78,3 +78,18 @@
that:
- 'result.changed == true'
- 'result.commands == ["no username ansibletest1", "no username ansibletest2", "no username ansibletest3"]'
- name: Delete collection of users again (idempotent)
iosxr_user:
users:
- name: ansibletest1
- name: ansibletest2
- name: ansibletest3
state: absent
provider: "{{ cli }}"
register: result
- assert:
that:
- 'result.changed == false'
- 'result.commands | length == 0'