mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Test idempotency after one iosxr user is created (#27227)
This commit is contained in:
parent
ec323514ef
commit
2dc5066f83
1 changed files with 13 additions and 13 deletions
|
@ -21,6 +21,19 @@
|
|||
- '"username" in result.commands[0]'
|
||||
- '"secret" in result.commands[0]'
|
||||
|
||||
- name: Add user again (Idempotent)
|
||||
iosxr_user:
|
||||
name: ansibletest1
|
||||
password: test
|
||||
state: present
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
- 'result.commands | length == 0'
|
||||
|
||||
- name: Collection of users (SetUp)
|
||||
iosxr_user:
|
||||
users:
|
||||
|
@ -36,19 +49,6 @@
|
|||
- 'result.changed == true'
|
||||
- 'result.commands == ["username ansibletest2 group sysadmin", "username ansibletest3 group sysadmin"]'
|
||||
|
||||
- name: Add user again (Idempotent)
|
||||
iosxr_user:
|
||||
name: ansibletest1
|
||||
password: test
|
||||
state: present
|
||||
provider: "{{ cli }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- 'result.changed == false'
|
||||
- 'result.commands | length == 0'
|
||||
|
||||
- name: Add collection of users again (Idempotent)
|
||||
iosxr_user:
|
||||
users:
|
||||
|
|
Loading…
Reference in a new issue