Spec-Zone.ru › Ansible

модуль dellemc.enterprise_sonic.sonic_aaa – управление конфигурацией AAA в SONiC

Примечание

Этот модуль входит в коллекцию dellemc.enterprise_sonic (версия 3.2.0).

Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не входит в ansible-core. Чтобы проверить, установлена ли она, выполните ansible-galaxy collection list.

Для установки используйте: ansible-galaxy collection install dellemc.enterprise_sonic.

Чтобы использовать коллекцию в плейбуке, укажите: dellemc.enterprise_sonic.sonic_aaa.

Добавлено в dellemc.enterprise_sonic 1.1.0

  • Краткое описание
  • Параметры
  • Примечания
  • Примеры
  • Возвращаемые значения

Краткое описание

  • Этот модуль предназначен для управления конфигурацией AAA на устройствах под управлением SONiC.

Параметры

Параметр

Комментарии

config

dictionary

Конфигурация AAA

Для всех списков в модуле элементы следует указывать в порядке желаемого приоритета.

Элементы, указанные первыми, имеют наивысший приоритет.

authentication

dictionary

добавлено в dellemc.enterprise_sonic 3.0.0

Конфигурация аутентификации AAA

auth_method

list / elements=string

Задает порядок методов аутентификации при входе в систему

Можно указать любой один вариант или два варианта: local и другую группу

Параметр cac-piv доступен только на устройствах под управлением sonic версии 4.5.0 и выше.

MFA неприменима, если cac-piv настроен как первый фактор аутентификации.

Варианты:

  • "ldap"
  • "local"
  • "radius"
  • "tacacs+"
  • "cac-piv"

console_auth_local

boolean

Включить или отключить локальную аутентификацию на консоли

Варианты:

  • false
  • true

failthrough

boolean

Включить или отключить переход к следующему методу при сбое

Варианты:

  • false
  • true

login_mfa_console

boolean

добавлено в dellemc.enterprise_sonic 3.1.0

Включить или отключить метод MFA для доступа через консоль.

Варианты:

  • false
  • true

mfa_auth_method

string

добавлено в dellemc.enterprise_sonic 3.1.0

Указывает RSA SecurID в качестве метода многофакторной аутентификации.

Варианты:

  • "rsa-securid"

authorization

dictionary

добавлено в dellemc.enterprise_sonic 3.0.0

Конфигурация авторизации AAA

commands_auth_method

list / elements=string

Задает порядок методов авторизации команд

Варианты:

  • "local"
  • "tacacs+"

login_auth_method

list / elements=string

Задает порядок методов авторизации при входе в систему

Варианты:

  • "ldap"
  • "local"

name_service

dictionary

добавлено в dellemc.enterprise_sonic 3.0.0

Конфигурация службы имен AAA

group

list / elements=string

Источник службы имен для метода group

Варианты:

  • "ldap"
  • "local"
  • "login"

netgroup

list / elements=string

Источник службы имен для метода netgroup

Варианты:

  • "ldap"
  • "local"

passwd

list / elements=string

Источник службы имен для метода passwd

Варианты:

  • "ldap"
  • "local"
  • "login"

shadow

list / elements=string

Источник службы имен для метода shadow

Варианты:

  • "ldap"
  • "local"
  • "login"

sudoers

list / elements=string

Источник службы имен для метода sudoers

Варианты:

  • "ldap"
  • "local"

state

string

Состояние конфигурации после завершения работы модуля

Варианты:

  • "merged" ← (по умолчанию)
  • "deleted"
  • "overridden"
  • "replaced"

Примечания

Примечание

  • Проверено на Enterprise SONiC Distribution от Dell Technologies
  • Поддерживает check_mode

Примеры

# Using "merged" state
#
# Before state:
# -------------
#
# sonic# show aaa
# (No AAA configuration present)
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : None
# Console Exempted               : None
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None

- name: Merge AAA configuration
  dellemc.enterprise_sonic.sonic_aaa:
    config:
      authentication:
        auth_method:
          - local
          - ldap
        console_auth_local: true
        failthrough: true
        mfa_auth_method: 'rsa-securid'
        login_mfa_console: true
      authorization:
        commands_auth_method:
          - local
          - tacacs+
        login_auth_method:
          - local
          - ldap
      name_service:
        group:
          - ldap
        netgroup:
          - local
        passwd:
          - login
        shadow:
          - ldap
        sudoers:
          - local
    state: merged

# After state:
# ------------
#
# sonic# show aaa
# ---------------------------------------------------------
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local, ldap
# login-mfa    : rsa-securid
# console authentication  : local
# ---------------------------------------------------------
# AAA Authorization Information
# ---------------------------------------------------------
# login        : local, ldap
# commands     : local, tacacs+
# ---------------------------------------------------------
# AAA Name-Service Information
# ---------------------------------------------------------
# group-method    : ldap
# netgroup-method : local
# passwd-method   : login
# shadow-method   : ldap
# sudoers-method  : local
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : rsa-securid
# Console Exempted               : No
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None


# Using "replaced" state
#
# Before state:
# -------------
#
# sonic# show aaa
# ---------------------------------------------------------
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local, ldap
# login-mfa    : rsa-securid
# console authentication  : local
# ---------------------------------------------------------
# AAA Authorization Information
# ---------------------------------------------------------
# login        : local, ldap
# commands     : local, tacacs+
# ---------------------------------------------------------
# AAA Name-Service Information
# ---------------------------------------------------------
# group-method    : ldap
# netgroup-method : local
# passwd-method   : login
# shadow-method   : ldap
# sudoers-method  : local
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : rsa-securid
# Console Exempted               : No
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None

- name: Replace AAA configuration
  dellemc.enterprise_sonic.sonic_aaa:
    config:
      authentication:
        auth_method:
          - cac-piv
          - local
        console_auth_local: true
        failthrough: false
      authorization:
        commands_auth_method:
          - local
      name_service:
        group:
          - ldap
    state: replaced

# After state:
# ------------
#
# sonic# show aaa
# ---------------------------------------------------------
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : False
# login-method : cac-piv, local
# login-mfa    : None
# console authentication  : local
# ---------------------------------------------------------
# AAA Authorization Information
# ---------------------------------------------------------
# login        : local
# ---------------------------------------------------------
# AAA Name-Service Information
# ---------------------------------------------------------
# group-method    : ldap
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : None
# Console Exempted               : None
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None


# Using "overridden" state
#
# Before state:
# -------------
#
# sonic# show aaa
# ---------------------------------------------------------
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local, ldap
# login-mfa    : rsa-securid
# console authentication  : local
# ---------------------------------------------------------
# AAA Authorization Information
# ---------------------------------------------------------
# login        : local, ldap
# commands     : local, tacacs+
# ---------------------------------------------------------
# AAA Name-Service Information
# ---------------------------------------------------------
# group-method    : ldap
# netgroup-method : local
# passwd-method   : login
# shadow-method   : ldap
# sudoers-method  : local
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : rsa-securid
# Console Exempted               : Yes
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None

- name: Override AAA configuration
  dellemc.enterprise_sonic.sonic_aaa:
    config:
      authentication:
        auth_method:
          - tacacs+
        console_auth_local: true
        failthrough: true
        mfa_auth_method: 'rsa-securid'
        login_mfa_console: true
    state: overridden

# After state:
# ------------
#
# sonic# show aaa
# ---------------------------------------------------------
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : tacacs+
# login-mfa    : rsa-securid
# console authentication  : local
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : rsa-securid
# Console Exempted               : No
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None


# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show aaa
# ---------------------------------------------------------
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local, ldap
# login-mfa    : rsa-securid
# console authentication  : local
# ---------------------------------------------------------
# AAA Authorization Information
# ---------------------------------------------------------
# login        : local, ldap
# commands     : local, tacacs+
# ---------------------------------------------------------
# AAA Name-Service Information
# ---------------------------------------------------------
# group-method    : ldap
# netgroup-method : local
# passwd-method   : login
# shadow-method   : ldap
# sudoers-method  : local
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : rsa-securid
# Console Exempted               : No
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None

- name: Delete AAA individual attributes
  dellemc.enterprise_sonic.sonic_aaa:
    config:
      authentication:
        auth_method:
          - local
          - ldap
        console_auth_local: true
        failthrough: true
        mfa_auth_method: 'rsa-securid'
        login_mfa_console: true
      authorization:
        commands_auth_method:
          - local
          - tacacs+
        login_auth_method:
          - local
          - ldap
      name_service:
        group:
          - ldap
        netgroup:
          - local
        passwd:
          - login
        shadow:
          - ldap
        sudoers:
          - local
    state: deleted

# After state:
# ------------
#
# sonic# show aaa
# (No AAA configuration present)
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : None
# Console Exempted               : None
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None


# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show aaa
# ---------------------------------------------------------
# AAA Authentication Information
# ---------------------------------------------------------
# failthrough  : True
# login-method : local, ldap
# login-mfa    : rsa-securid
# console authentication  : local
# ---------------------------------------------------------
# AAA Authorization Information
# ---------------------------------------------------------
# login        : local, ldap
# commands     : local, tacacs+
# ---------------------------------------------------------
# AAA Name-Service Information
# ---------------------------------------------------------
# group-method    : ldap
# netgroup-method : local
# passwd-method   : login
# shadow-method   : ldap
# sudoers-method  : local
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : rsa-securid
# Console Exempted               : Yes
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None

- name: Delete all AAA configuration
  dellemc.enterprise_sonic.sonic_aaa:
    config: {}
    state: deleted

# After state:
# ------------
#
# sonic# show aaa
# (No AAA configuration present)
#
# sonic# show mfa
# ---------------------------------------------------------
# Multi-factor Authentication Information
# ---------------------------------------------------------
# MFA Authentication             : None
# Console Exempted               : None
# MFA Service Security Profile   : None
# RSA SecurID Security Profile   : None

Возвращаемые значения

Общие возвращаемые значения описаны здесь; ниже перечислены поля, уникальные для этого модуля:

Ключ

Описание

after

dictionary

Конфигурация после вызова модуля.

Возвращается: при наличии изменений

after(generated)

dictionary

Сгенерированная конфигурация после вызова модуля.

Возвращается: когда check_mode

before

dictionary

Конфигурация до вызова модуля.

Возвращается: всегда

commands

list / elements=string

Набор команд, отправленных на удаленное устройство.

Возвращается: всегда

Пример: ["command 1", "command 2", "command 3"]

Авторы

    1. Talabi (@stalabi1)

Ссылки на коллекцию

  • Отслеживание проблем
  • Репозиторий (исходный код)

© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/dellemc/enterprise_sonic/sonic_aaa_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API