2017-06-06 16:35:08 +02:00
|
|
|
---
|
2017-12-07 23:01:28 +01:00
|
|
|
- name: Setup
|
|
|
|
net_user: &clear_netop
|
|
|
|
name: netop
|
|
|
|
state: absent
|
|
|
|
authorize: yes
|
|
|
|
provider: "{{ cli }}"
|
|
|
|
|
2017-06-06 16:35:08 +02:00
|
|
|
- name: Set user to privilege level 15
|
|
|
|
net_user:
|
|
|
|
name: netop
|
2017-12-06 11:24:58 +01:00
|
|
|
nopassword: yes
|
2017-06-06 16:35:08 +02:00
|
|
|
privilege: 15
|
|
|
|
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 privilege 15", "username netop nopassword"]'
|
2017-06-06 16:35:08 +02:00
|
|
|
|
|
|
|
- name: tearDown
|
2017-12-07 23:01:28 +01:00
|
|
|
net_user: *clear_netop
|