mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
8643e9cb34
* changed collection arg to argregate on 2.4 network modules * replace users with aggregate in eos_user, junos_user, nxos_user * added version_added to places where we replaced users with aggregate in the docs * fix ios_static_route test * update tests to reference aggregate instead of collection/users
42 lines
917 B
YAML
42 lines
917 B
YAML
---
|
|
- name: Create user
|
|
nxos_user:
|
|
name: netend
|
|
roles: network-operator
|
|
state: present
|
|
authorize: yes
|
|
provider: "{{ nxapi }}"
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- 'result.changed == true'
|
|
- 'result.commands == ["username netend role network-operator"]'
|
|
|
|
- name: Collection of users
|
|
nxos_user:
|
|
aggregate:
|
|
- name: test1
|
|
- name: test2
|
|
authorize: yes
|
|
state: present
|
|
roles: network-admin
|
|
provider: "{{ nxapi }}"
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- 'result.changed == true'
|
|
- 'result.commands == ["username test1 role network-admin", "username test2 role network-admin"]'
|
|
|
|
- name: tearDown
|
|
nxos_user:
|
|
purge: yes
|
|
authorize: yes
|
|
provider: "{{ nxapi }}"
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- 'result.changed == true'
|
|
- 'result.commands == ["no username netend", "no username test1", "no username test2"]'
|