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/ios_user/tests/cli/basic.yaml

44 lines
952 B
YAML

---
- name: Create user
ios_user:
name: netend
privilege: 15
role: network-operator
state: present
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
that:
- 'result.changed == true'
- 'result.commands == ["username netend view network-operator", "username netend privilege 15"]'
- name: Collection of users
ios_user:
users:
- name: test1
- name: test2
authorize: yes
state: present
view: network-admin
provider: "{{ cli }}"
register: result
- assert:
that:
- 'result.changed == true'
- 'result.commands == ["username test1 view network-admin", "username test2 view network-admin"]'
- name: tearDown
ios_user:
purge: yes
authorize: yes
provider: "{{ cli }}"
register: result
- assert:
that:
- 'result.changed == true'
- 'result.commands == ["no username netend", "no username test1", "no username test2"]'