2017-06-06 16:35:08 +02:00
|
|
|
---
|
2017-12-07 23:01:28 +01:00
|
|
|
- name: Setup
|
|
|
|
net_user: &clear_users
|
|
|
|
aggregate:
|
|
|
|
- name: netop
|
|
|
|
- name: netend
|
|
|
|
state: absent
|
|
|
|
authorize: yes
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
2017-06-06 16:35:08 +02:00
|
|
|
- name: Set multiple users role
|
|
|
|
net_user:
|
2017-07-26 16:09:17 +02:00
|
|
|
aggregate:
|
2017-06-06 16:35:08 +02:00
|
|
|
- name: netop
|
|
|
|
- name: netend
|
2017-12-07 23:01:28 +01:00
|
|
|
nopassword: yes
|
2017-06-06 16:35:08 +02:00
|
|
|
role: network-operator
|
|
|
|
state: present
|
|
|
|
authorize: yes
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- 'result.changed == true'
|
2017-12-07 23:01:28 +01:00
|
|
|
- 'result.commands == ["username netop role network-operator", "username netop nopassword", "username netend role network-operator", "username netend nopassword"]'
|
2017-06-06 16:35:08 +02:00
|
|
|
|
|
|
|
- name: tearDown
|
2017-12-07 23:01:28 +01:00
|
|
|
net_user: *clear_users
|