dellemc.enterprise_sonic.sonic_mgmt_servers модуль — Управление конфигурацией серверов управления на SONiC
Примечание
Этот модуль входит в коллекцию dellemc.enterprise_sonic (версия 2.5.1).
Эта коллекция, возможно, уже установлена, если вы используете пакет 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 dictionary | Конфигурация серверов управления |
|
rest dictionary |
Конфигурация REST-сервера |
|
api_timeout integer |
Максимальное время в секундах, которое REST-сервер будет ожидать завершения цикла запрос-ответ REST API Диапазон 0-4294967295 Default: |
|
client_auth string |
Список методов аутентификации клиента Укажите в виде списка, разделенного запятыми. Варианты для списка: password, jwt, cert и none. Default: |
|
log_level integer |
Уровень логирования REST-сервера, диапазон 0-255 Default: |
|
port integer |
Порт, на котором прослушивает REST-сервер, диапазон 0-65535 Default: |
|
read_timeout integer |
Максимальное время в секундах, которое REST-сервер будет ожидать завершения цикла запрос-ответ HTTP Диапазон 0-4294967295 Default: |
|
req_limit integer |
Максимальное количество параллельных запросов, которые клиент может сделать к REST-серверу Диапазон 0-4294967295 |
|
security_profile string |
Имя профиля безопасности |
|
shutdown boolean |
Включает/отключает прослушивание REST-сервером порта Choices:
|
|
vrf string |
Имя VRF Choices:
|
|
telemetry dictionary |
Конфигурация сервера телеметрии |
|
api_timeout integer |
Максимальное время в секундах, которое сервер телеметрии будет ожидать завершения цикла запрос-ответ gNMI Диапазон 0-4294967295 Default: |
|
client_auth string |
Список методов аутентификации клиента Укажите в виде списка, разделенного запятыми. Варианты для списка: password, jwt, cert и none. Default: |
|
jwt_refresh integer |
Продолжительность времени в секундах до истечения срока действия JWT и возможности его обновления Диапазон 0-4294967295 Default: |
|
jwt_valid integer |
Продолжительность времени в секундах, в течение которого JWT действителен на сервере телеметрии Диапазон 0-4294967295 Default: |
|
log_level integer |
Уровень логирования сервера телеметрии, диапазон 0-255 Default: |
|
port integer |
Порт, на котором прослушивает сервер телеметрии, диапазон 0-65535 Default: |
|
security_profile string |
Имя профиля безопасности |
|
vrf string |
Имя VRF Choices:
|
state string | Состояние конфигурации после завершения работы модуля. Choices:
|
Примечания
Примечание
- Проверено на Enterprise SONiC Distribution компании Dell Technologies.
- Поддерживает
check_mode.
Примеры
# Using Merged
#
# 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
#
# 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
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
#
# 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
#
# 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
#
# 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
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
#
# 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
#
# 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
#
# 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
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
#
# 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
#
# 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
#
# 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
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
#
# 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 список / элементы=строка | Результат вызова модуля конфигурации. Возвращается: при изменении Пример: |
after(generated) список / элементы=строка | Сгенерированная конфигурация из вызова модуля. Возвращается: когда Пример: |
before список / элементы=строка | Конфигурация до вызова модуля. Возвращается: всегда Пример: |
commands список / элементы=строка | Набор команд, отправленных на удаленное устройство. Возвращается: всегда Пример: |
Ссылки на коллекцию
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_mgmt_servers_module.html