community.network.cnos_user – Manage the collection of local users on Lenovo CNOS devices¶
Note
This plugin is part of the community.network collection (version 2.1.1).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.cnos_user
.
Synopsis¶
This module provides declarative management of the local usernames configured on Lenovo CNOS devices. It allows playbooks to manage either individual usernames or the collection of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined.
Parameters¶
Examples¶
- name: Create a new user
community.network.cnos_user:
name: ansible
sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
state: present
- name: Remove all users except admin
community.network.cnos_user:
purge: yes
- name: Set multiple users role
aggregate:
- name: Netop
- name: Netend
role: network-operator
state: present
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Anil Kumar Muraleedharan (@amuraleedhar)