|
|
@ -5,9 +5,10 @@
|
|
|
|
- no username ansibletest1
|
|
|
|
- no username ansibletest1
|
|
|
|
- no username ansibletest2
|
|
|
|
- no username ansibletest2
|
|
|
|
- no username ansibletest3
|
|
|
|
- no username ansibletest3
|
|
|
|
|
|
|
|
- no username ansibletest4
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create user
|
|
|
|
- name: Create user with role
|
|
|
|
eos_user:
|
|
|
|
eos_user:
|
|
|
|
name: ansibletest1
|
|
|
|
name: ansibletest1
|
|
|
|
privilege: 15
|
|
|
|
privilege: 15
|
|
|
@ -22,9 +23,27 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- 'result.changed == true'
|
|
|
|
- 'result.changed == true'
|
|
|
|
- '"username" in result.commands[0]'
|
|
|
|
- '"username" in result.commands[0]'
|
|
|
|
- '"role network-operator" in result.commands[0]'
|
|
|
|
- '"secret" in result.commands[0]'
|
|
|
|
|
|
|
|
- '"role network-operator" in result.commands[1]'
|
|
|
|
|
|
|
|
- '"privilege 15" in result.commands[2]'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create user with priv level and update_password
|
|
|
|
|
|
|
|
eos_user:
|
|
|
|
|
|
|
|
name: ansibletest4
|
|
|
|
|
|
|
|
privilege: 15
|
|
|
|
|
|
|
|
state: present
|
|
|
|
|
|
|
|
configured_password: test1
|
|
|
|
|
|
|
|
authorize: yes
|
|
|
|
|
|
|
|
update_password: on_create
|
|
|
|
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
|
|
|
that:
|
|
|
|
|
|
|
|
- 'result.changed == true'
|
|
|
|
|
|
|
|
- '"username" in result.commands[0]'
|
|
|
|
|
|
|
|
- '"secret" in result.commands[0]'
|
|
|
|
- '"privilege 15" in result.commands[1]'
|
|
|
|
- '"privilege 15" in result.commands[1]'
|
|
|
|
- '"secret" in result.commands[2]'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Collection of users
|
|
|
|
- name: Collection of users
|
|
|
|
eos_user:
|
|
|
|
eos_user:
|
|
|
@ -69,4 +88,5 @@
|
|
|
|
- no username ansibletest1
|
|
|
|
- no username ansibletest1
|
|
|
|
- no username ansibletest2
|
|
|
|
- no username ansibletest2
|
|
|
|
- no username ansibletest3
|
|
|
|
- no username ansibletest3
|
|
|
|
|
|
|
|
- no username ansibletest4
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
provider: "{{ cli }}"
|
|
|
|