1
0
Fork 0
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:
Ricardo Carrillo Cruz 2017-07-24 13:44:52 +02:00 committed by GitHub
parent ec323514ef
commit 2dc5066f83

View file

@ -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: