New in version 2.3.
parameter | required | default | choices | comments | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
full_name |
no | The full_name argument provides the full name of the user account to be created on the remote device. This argument accepts any text string value. | |||||||||||||||||||||||||||||||||||||
name |
no | The name argument defines the username of the user to be created on the system. This argument must follow appropriate usernaming conventions for the target device running JUNOS. This argument is mutually exclusive with the users argument. | |||||||||||||||||||||||||||||||||||||
provider |
no | A dict object containing connection details. | |||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
purge |
no | The purge argument instructs the module to consider the users definition absolute. It will remove any previously configured users on the device with the exception of the current defined set of users. | |||||||||||||||||||||||||||||||||||||
role |
no | read-only |
|
The role argument defines the role of the user account on the remote system. User accounts can have more than one role configured. | |||||||||||||||||||||||||||||||||||
sshkey |
no | The sshkey argument defines the public SSH key to be configured for the user account on the remote system. This argument must be a valid SSH key | |||||||||||||||||||||||||||||||||||||
state |
no | present |
|
The state argument configures the state of the user definitions as it relates to the device operational configuration. When set to present, the user should be configured in the device active configuration and when set to absent the user should not be in the device active configuration | |||||||||||||||||||||||||||||||||||
users |
no | The users argument defines a list of users to be configured on the remote device. The list of users will be compared against the current users and only changes will be added or removed from the device configuration. This argument is mutually exclusive with the name argument. |
- name: create new user account junos_user: name: ansible role: super-user sshkey: "{{ lookup('file', '~/.ssh/ansible.pub') }}" state: present - name: remove a user account junos_user: name: ansible state: absent - name: remove all user accounts except ansible junos_user: name: ansible purge: yes
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is maintained by those with core commit privileges
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.