dellemc.enterprise_sonic.sonic_aaa module – Manage AAA and its parameters

Note

This module is part of the dellemc.enterprise_sonic collection (version 1.1.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic.

To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_aaa.

New in version 1.1.0: of dellemc.enterprise_sonic

Synopsis

  • This module is used for configuration management of aaa parameters on devices running Enterprise SONiC.

Note

This module has a corresponding action plugin.

Parameters

Parameter

Comments

config

dictionary

Specifies the aaa related configurations

authentication

dictionary

Specifies the configurations required for aaa authentication

data

dictionary

Specifies the data required for aaa authentication

fail_through

boolean

Specifies the state of failthrough

Choices:

  • no

  • yes

group

string

Specifies the method of aaa authentication

Choices:

  • ldap

  • radius

  • tacacs+

local

boolean

Enable or Disable local authentication

Choices:

  • no

  • yes

state

string

Specifies the operation to be performed on the aaa parameters configured on the device.

In case of merged, the input configuration will be merged with the existing aaa configuration on the device.

In case of deleted the existing aaa configuration will be removed from the device.

Choices:

  • merged ← (default)

  • deleted

Notes

Note

  • Tested against Enterprise SONiC Distribution by Dell Technologies.

  • Supports check_mode.

Examples

# Using deleted
#
# Before state:
# -------------
#
# do show aaa
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local

- name: Delete aaa configurations
  dellemc.enterprise_sonic.sonic_aaa:
    config:
      authentication:
        data:
          local: True
    state: deleted

# After state:
# ------------
#
# do show aaa
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method :


# Using deleted
#
# Before state:
# -------------
#
# do show aaa
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local

- name: Delete aaa configurations
  dellemc.enterprise_sonic.sonic_aaa:
    config:
    state: deleted

# After state:
# ------------
#
# do show aaa
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  :
# login-method :


# Using merged
#
# Before state:
# -------------
#
# do show aaa
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : False
# login-method :

- name: Merge aaa configurations
  dellemc.enterprise_sonic.sonic_aaa:
    config:
      authentication:
        data:
          local: true
          fail_through: true
    state: merged

# After state:
# ------------
#
# do show aaa
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

after

list / elements=string

The resulting configuration model invocation.

Returned: when changed

Sample: “The configuration returned will always be in the same format of the parameters above.\n”

before

list / elements=string

The configuration prior to the model invocation.

Returned: always

Sample: “The configuration returned will always be in the same format of the parameters above.\n”

commands

list / elements=string

The set of commands pushed to the remote device.

Returned: always

Sample: [“command 1”, “command 2”, “command 3”]

Authors

  • Abirami N (@abirami-n)