community.general.icx_user (0.1.1) — module

Manage the user accounts on Ruckus ICX 7000 series switches.

Authors: Ruckus Wireless (@Commscope)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module creates or updates user account on network devices. It allows playbooks to manage either individual usernames or the aggregate of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create a new user without password
  icx_user:
    name: user1
    nopassword: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create a new user with password
  icx_user:
    name: user1
    configured_password: 'newpassword'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove users
  icx_user:
    name: user1
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: set user privilege level to 5
  icx_user:
    name: user1
    privilege: 5

Inputs

    
name:
    description:
    - The username to be configured on the ICX device.
    required: true
    type: str

purge:
    default: false
    description:
    - If set to true module will remove any previously configured usernames on the device
      except the current defined set of users.
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Configures the state of the username definition as it relates to the device operational
      configuration. When set to I(present), the username(s) should be configured in the
      device active configuration and when set to I(absent) the username(s) should not
      be in the device active configuration
    type: str

aggregate:
    aliases:
    - users
    - collection
    description:
    - The set of username objects to be configured on the remote ICX device. The list
      entries can either be the username or a hash of username and properties. This argument
      is mutually exclusive with the C(name) argument.
    suboptions:
      access_time:
        description:
        - This parameter indicates the time the file's access time should be set to. Should
          be preserve when no modification is required, YYYYMMDDHHMM.SS when using default
          time format, or now. Default is None meaning that preserve is the default for
          state=[file,directory,link,hard] and now is default for state=touch
        type: str
      check_running_config:
        description:
        - Check running configuration. This can be set as environment variable. Module
          will use environment variable value(default:True), unless it is overridden,
          by specifying it as module parameter.
        type: bool
      configured_password:
        description: The password to be configured on the ICX device.
        type: str
      name:
        description:
        - The username to be configured on the ICX device.
        required: true
        type: str
      nopassword:
        description:
        - Defines the username without assigning a password. This will allow the user
          to login to the system without being authenticated by a password.
        type: bool
      privilege:
        choices:
        - '0'
        - '4'
        - '5'
        description:
        - The privilege level to be granted to the user
        type: str
      state:
        choices:
        - present
        - absent
        description:
        - Configures the state of the username definition as it relates to the device
          operational configuration. When set to I(present), the username(s) should be
          configured in the device active configuration and when set to I(absent) the
          username(s) should not be in the device active configuration
        type: str
      update_password:
        choices:
        - on_create
        - always
        description:
        - This argument will instruct the module when to change the password. When set
          to C(always), the password will always be updated in the device and when set
          to C(on_create) the password will be updated only if the username is created.
        type: str
    type: list

privilege:
    choices:
    - '0'
    - '4'
    - '5'
    default: 0
    description:
    - The privilege level to be granted to the user
    type: str

nopassword:
    description:
    - Defines the username without assigning a password. This will allow the user to login
      to the system without being authenticated by a password.
    type: bool

access_time:
    description:
    - This parameter indicates the time the file's access time should be set to. Should
      be preserve when no modification is required, YYYYMMDDHHMM.SS when using default
      time format, or now. Default is None meaning that preserve is the default for state=[file,directory,link,hard]
      and now is default for state=touch
    type: str

update_password:
    choices:
    - on_create
    - always
    default: always
    description:
    - This  argument will instruct the module when to change the password. When set to
      C(always), the password will always be updated in the device and when set to C(on_create)
      the password will be updated only if the username is created.
    type: str

configured_password:
    description: The password to be configured on the ICX device.
    type: str

check_running_config:
    default: true
    description:
    - Check running configuration. This can be set as environment variable. Module will
      use environment variable value(default:True), unless it is overridden, by specifying
      it as module parameter.
    type: bool

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always
  sample:
  - username ansible nopassword
  - username ansible password-string alethea123
  - no username ansible
  - username ansible privilege 5
  - username ansible enable
  type: list