You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/net_user/tests/eos/userrole.yaml

30 lines
660 B
YAML

---
- name: Setup
net_user: &clear_users
aggregate:
- name: netop
- name: netend
state: absent
authorize: yes
provider: "{{ cli }}"
- name: Set multiple users role
net_user:
aggregate:
- name: netop
- name: netend
nopassword: yes
role: network-operator
state: present
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
that:
- 'result.changed == true'
- 'result.commands == ["username netop role network-operator", "username netop nopassword", "username netend role network-operator", "username netend nopassword"]'
- name: tearDown
net_user: *clear_users