Spec-Zone.ru › Ansible

модуль dellemc.enterprise_sonic.sonic_mgmt_servers – Управление конфигурацией серверов управления в 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_mgmt_servers.

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

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

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

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

Параметры

Параметр

Комментарии

config

словарь

Конфигурация серверов управления

rest

словарь

Конфигурация REST-сервера

api_timeout

целое число

Максимальное время в секундах, в течение которого REST-сервер ожидает завершения цикла запроса и ответа REST API

Диапазон: 0–4294967295

По умолчанию: 900

cipher_suite

строка

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

Наборы шифров для TLS-соединения с клиентами

Укажите значения списком через запятую. Варианты: ecdhe-ecdsa-with-aes-256-gcm-SHA384, ecdhe-ecdsa-with-chacha20-poly1305-SHA256 и ecdhe-ecdsa-with-aes-128-gcm-SHA256.

По умолчанию: "ecdhe-ecdsa-with-aes-256-gcm-SHA384,ecdhe-ecdsa-with-chacha20-poly1305-SHA256,ecdhe-ecdsa-with-aes-128-gcm-SHA256"

client_auth

строка

Список методов аутентификации клиента

Укажите значения списком через запятую. Варианты: password, jwt, cert и none.

По умолчанию: "password,jwt"

log_level

целое число

Уровень журналирования REST-сервера, диапазон 0–255

По умолчанию: 0

port

целое число

Порт, на котором REST-сервер принимает подключения, диапазон 0–65535

По умолчанию: 443

read_timeout

целое число

Максимальное время в секундах, в течение которого REST-сервер ожидает завершения цикла HTTP-запроса и ответа

Диапазон: 0–4294967295

По умолчанию: 15

req_limit

целое число

Максимальное количество одновременных запросов, которые клиент может отправить REST-серверу

Диапазон: 0–4294967295

security_profile

строка

Имя профиля безопасности

shutdown

логическое значение

Включает или отключает прослушивание порта REST-сервером

Варианты:

  • false
  • true

vrf

строка

Имя VRF

Варианты:

  • "mgmt"

telemetry

словарь

Конфигурация сервера телеметрии

api_timeout

целое число

Максимальное время в секундах, в течение которого сервер телеметрии ожидает завершения цикла запроса и ответа gNMI

Диапазон: 0–4294967295

По умолчанию: 0

client_auth

строка

Список методов аутентификации клиента

Укажите значения списком через запятую. Варианты: password, jwt, cert и none.

По умолчанию: "password,jwt"

jwt_refresh

целое число

Время в секундах до истечения срока действия JWT, после которого его можно обновить

Диапазон: 0–4294967295

По умолчанию: 900

jwt_valid

целое число

Время в секундах, в течение которого JWT действителен на сервере телеметрии

Диапазон: 0–4294967295

По умолчанию: 3600

log_level

целое число

Уровень журналирования сервера телеметрии, диапазон 0–255

По умолчанию: 0

port

целое число

Порт, на котором сервер телеметрии принимает подключения, диапазон 0–65535

По умолчанию: 8080

security_profile

строка

Имя профиля безопасности

vrf

строка

Имя VRF

Варианты:

  • "mgmt"

state

строка

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

Варианты:

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

Примечания

Примечание

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

Примеры

# Using "merged" state
#
# Before state:
# -------------
#
# sonic# show ip rest
#
# Log level is 0
# Port is 443
# Request limit is not-set
# Read timeout is 15 seconds
# Client authentication mode is password,jwt
# Security profile is not-set
# API timeout is 900 seconds
# vrf is not-set
# Cipher suite is ecdhe-ecdsa-with-aes-256-gcm-SHA384,ecdhe-ecdsa-with-chacha20-poly1305-SHA256,ecdhe-ecdsa-with-aes-128-gcm-SHA256
#
# sonic# show ip telemetry
#
# Log level is 0
# JWT valid is 3600 seconds
# JWT refresh is 900 seconds
# Port is 8080
# Client authentication mode is password,jwt
# Security profile is not-set
# API timeout is 0 seconds
# vrf is not-set

- name: Merge mgmt servers configuration
  dellemc.enterprise_sonic.sonic_mgmt_servers:
    config:
      rest:
        api_timeout: 120
        client_auth: password
        log_level: 6
        port: 443
        read_timeout: 60
        req_limit: 100
        security_profile: profile1
        shutdown: true
        vrf: mgmt
        cipher_suite: ecdhe-ecdsa-with-aes-256-gcm-SHA384
      telemetry:
        api_timeout: 45
        client_auth: cert,jwt
        jwt_refresh: 80
        jwt_valid: 300
        log_level: 10
        port: 1234
        security_profile: profile2
        vrf: mgmt
    state: merged

# After state:
# ------------
#
# sonic# show ip rest
#
# Log level is 6
# Port is 443, disabled
# Request limit is 100
# Read timeout is 60 seconds
# Client authentication mode is password
# Security profile is profile1
# API timeout is 120 seconds
# vrf is mgmt
# Cipher suite is ecdhe-ecdsa-with-aes-256-gcm-SHA384
#
# sonic# show ip telemetry
#
# Log level is 10
# JWT valid is 300 seconds
# JWT refresh is 80 seconds
# Port is 1234
# Client authentication mode is cert,jwt
# Security profile is profile2
# API timeout is 45 seconds
# vrf is mgmt


# Using "replaced" state
#
# Before state:
# -------------
#
# sonic# show ip rest
#
# Log level is 6
# Port is 443, disabled
# Request limit is 100
# Read timeout is 60 seconds
# Client authentication mode is password
# Security profile is profile1
# API timeout is 120 seconds
# vrf is mgmt
# Cipher suite is ecdhe-ecdsa-with-aes-256-gcm-SHA384
#
# sonic# show ip telemetry
#
# Log level is 10
# JWT valid is 300 seconds
# JWT refresh is 80 seconds
# Port is 1234
# Client authentication mode is cert,jwt
# Security profile is profile2
# API timeout is 45 seconds
# vrf is mgmt

- name: Replace mgmt servers configuration
  dellemc.enterprise_sonic.sonic_mgmt_servers:
    config:
      rest:
        api_timeout: 180
        vrf: mgmt
        cipher_suite: ecdhe-ecdsa-with-aes-256-gcm-SHA384,ecdhe-ecdsa-with-chacha20-poly1305-SHA256
      telemetry:
        log_level: 25
        security_profile: profile2
    state: replaced

# After state:
# ------------
#
# sonic# show ip rest
#
# Log level is 0
# Port is 443
# Request limit is not-set
# Read timeout is 15 seconds
# Client authentication mode is password,jwt
# Security profile is not-set
# API timeout is 180 seconds
# vrf is mgmt
# Cipher suite is ecdhe-ecdsa-with-aes-256-gcm-SHA384,ecdhe-ecdsa-with-chacha20-poly1305-SHA256
#
# sonic# show ip telemetry
#
# Log level is 25
# JWT valid is 3600 seconds
# JWT refresh is 900 seconds
# Port is 8080
# Client authentication mode is password,jwt
# Security profile is profile2
# API timeout is 0 seconds
# vrf is not-set


# Using "overridden" state
#
# Before state:
# -------------
#
# sonic# show ip rest
#
# Log level is 6
# Port is 443, disabled
# Request limit is 100
# Read timeout is 60 seconds
# Client authentication mode is password
# Security profile is profile1
# API timeout is 120 seconds
# vrf is mgmt
# Cipher suite is ecdhe-ecdsa-with-aes-256-gcm-SHA384,ecdhe-ecdsa-with-chacha20-poly1305-SHA256
#
# sonic# show ip telemetry
#
# Log level is 10
# JWT valid is 300 seconds
# JWT refresh is 80 seconds
# Port is 1234
# Client authentication mode is cert,jwt
# Security profile is profile2
# API timeout is 45 seconds
# vrf is mgmt

- name: Override mgmt servers configuration
  dellemc.enterprise_sonic.sonic_mgmt_servers:
    config:
      rest:
        api_timeout: 120
        client_auth: password
        log_level: 6
        port: 443
        read_timeout: 60
        req_limit: 100
        security_profile: profile1
        shutdown: true
        vrf: mgmt
        cipher_suite: ecdhe-ecdsa-with-aes-128-gcm-SHA256,ecdhe-ecdsa-with-aes-256-gcm-SHA384
    state: overridden

# After state:
# ------------
#
# sonic# show ip rest
#
# Log level is 6
# Port is 443, disabled
# Request limit is 100
# Read timeout is 60 seconds
# Client authentication mode is password
# Security profile is profile1
# API timeout is 120 seconds
# vrf is mgmt
# Cipher suite is ecdhe-ecdsa-with-aes-128-gcm-SHA256,ecdhe-ecdsa-with-aes-256-gcm-SHA384
#
# sonic# show ip telemetry
#
# Log level is 0
# JWT valid is 3600 seconds
# JWT refresh is 900 seconds
# Port is 8080
# Client authentication mode is password,jwt
# Security profile is not-set
# API timeout is 0 seconds
# vrf is not-set


# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show ip rest
#
# Log level is 6
# Port is 443, disabled
# Request limit is 100
# Read timeout is 60 seconds
# Client authentication mode is password
# Security profile is profile1
# API timeout is 120 seconds
# vrf is mgmt
# Cipher suite is ecdhe-ecdsa-with-aes-128-gcm-SHA256,ecdhe-ecdsa-with-aes-256-gcm-SHA384
#
# sonic# show ip telemetry
#
# Log level is 10
# JWT valid is 300 seconds
# JWT refresh is 80 seconds
# Port is 1234
# Client authentication mode is cert,jwt
# Security profile is profile2
# API timeout is 45 seconds
# vrf is mgmt

- name: Delete mgmt servers configuration
  dellemc.enterprise_sonic.sonic_mgmt_servers:
    config:
      rest:
        api_timeout: 120
        client_auth: password
        log_level: 6
        port: 443
        read_timeout: 60
        req_limit: 100
        security_profile: profile1
        shutdown: true
        vrf: mgmt
        cipher_suite: ecdhe-ecdsa-with-aes-256-gcm-SHA384,ecdhe-ecdsa-with-aes-128-gcm-SHA256
      telemetry:
        api_timeout: 45
        client_auth: cert,jwt
        jwt_refresh: 80
        jwt_valid: 300
        log_level: 10
        port: 1234
        security_profile: profile2
        vrf: mgmt
    state: deleted

# After state:
# ------------
#
# sonic# show ip rest
#
# Log level is 0
# Port is 443
# Request limit is not-set
# Read timeout is 15 seconds
# Client authentication mode is password,jwt
# Security profile is not-set
# API timeout is 900 seconds
# vrf is not-set
# Cipher suite is ecdhe-ecdsa-with-aes-256-gcm-SHA384,ecdhe-ecdsa-with-chacha20-poly1305-SHA256,ecdhe-ecdsa-with-aes-128-gcm-SHA256
#
# sonic# show ip telemetry
#
# Log level is 0
# JWT valid is 3600 seconds
# JWT refresh is 900 seconds
# Port is 8080
# Client authentication mode is password,jwt
# Security profile is not-set
# API timeout is 0 seconds
# vrf is not-set

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

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

Ключ

Описание

after

список / элементы=строка

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

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

Пример: ["The configuration returned will always be in the same format as the parameters above.\n"]

after(generated)

список / элементы=строка

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

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

Пример: ["The configuration returned will always be in the same format\n as the parameters above.\n"]

before

список / элементы=строка

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

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

Пример: ["The configuration returned will always be in the same format as the parameters above.\n"]

commands

список / элементы=строка

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

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

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

Авторы

    1. S. 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_mgmt_servers_module.html

Spec-Zone.ru

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