2017-06-08 08:58:29 +02:00
|
|
|
---
|
|
|
|
- name: Create user
|
|
|
|
eos_user:
|
2017-08-11 16:42:43 +02:00
|
|
|
name: netend
|
2017-06-08 08:58:29 +02:00
|
|
|
privilege: 15
|
|
|
|
role: network-operator
|
|
|
|
state: present
|
|
|
|
authorize: yes
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- 'result.changed == true'
|
|
|
|
- 'result.commands == ["username netend role network-operator", "username netend privilege 15"]'
|
|
|
|
|
|
|
|
- name: Collection of users
|
|
|
|
eos_user:
|
2017-07-26 16:09:17 +02:00
|
|
|
aggregate:
|
2017-08-11 16:42:43 +02:00
|
|
|
- name: test1
|
|
|
|
- name: test2
|
2017-06-08 08:58:29 +02:00
|
|
|
authorize: yes
|
|
|
|
state: present
|
2017-07-17 13:56:32 +02:00
|
|
|
role: network-operator
|
2017-06-08 08:58:29 +02:00
|
|
|
provider: "{{ cli }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- 'result.changed == true'
|
2017-07-17 13:56:32 +02:00
|
|
|
- 'result.commands == ["username test1 role network-operator", "username test2 role network-operator"]'
|
2017-06-08 08:58:29 +02:00
|
|
|
|
|
|
|
- name: tearDown
|
2017-07-17 14:28:03 +02:00
|
|
|
eos_config:
|
|
|
|
lines:
|
|
|
|
- no username netend
|
|
|
|
- no username test1
|
|
|
|
- no username test2
|
2017-06-08 08:58:29 +02:00
|
|
|
provider: "{{ cli }}"
|