dellemc.openmanage.ome_application_alerts_syslog 模块 – 配置 OpenManage Enterprise 和 OpenManage Enterprise Modular 上的 syslog 转发设置

注意

此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。

如果您使用的是 ansible 包,则您可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求

要在 playbook 中使用它,请指定:dellemc.openmanage.ome_application_alerts_syslog

dellemc.openmanage 4.3.0 中的新增功能

概要

  • 此模块允许配置 OpenManage Enterprise 和 OpenManage Enterprise Modular 上的 syslog 转发设置。

要求

执行此模块的主机需要以下要求。

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

dellemc.openmanage 5.0.0 中添加

包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。

hostname

字符串 / 必需

OpenManage Enterprise 或 OpenManage Enterprise Modular 的 IP 地址或主机名。

password

字符串

OpenManage Enterprise 或 OpenManage Enterprise Modular 密码。

如果未提供密码,则使用环境变量 OME_PASSWORD

示例:export OME_PASSWORD=password

port

整数

OpenManage Enterprise 或 OpenManage Enterprise Modular 的 HTTPS 端口。

默认值: 443

syslog_servers

列表 / 元素=字典

要转发 syslog 的服务器列表。

destination_address

字符串

syslog 服务器的 IP 地址、完全限定域名或主机名。

如果 enabledtrue,则这是必需的。

enabled

布尔值

启用或禁用 syslog 转发。

选项

  • false

  • true

id

整数 / 必需

syslog 服务器的 ID。

选项

  • 1

  • 2

  • 3

  • 4

port_number

整数

syslog 服务器的 UDP 端口号。

timeout

整数

dellemc.openmanage 5.0.0 中添加

以秒为单位的套接字级别超时。

默认值: 30

username

字符串

OpenManage Enterprise 或 OpenManage Enterprise Modular 用户名。

如果未提供用户名,则使用环境变量 OME_USERNAME

示例:export OME_USERNAME=username

validate_certs

布尔值

dellemc.openmanage 5.0.0 中添加

如果为 false,则不会验证 SSL 证书。

仅在使用自签名证书的个人控制站点上配置 false

在集合版本 5.0.0 之前,validate_certs 默认值为 false

选项

  • false

  • true ← (默认)

x_auth_token

字符串

dellemc.openmanage 9.3.0 中添加

身份验证令牌。

如果未提供 x_auth_token,则使用环境变量 OME_X_AUTH_TOKEN

示例:export OME_X_AUTH_TOKEN=x_auth_token

备注

注意

  • 从此模块可以直接访问 Dell OpenManage Enterprise 或 Dell OpenManage Enterprise Modular 的系统运行此模块。

  • 此模块支持 check_mode

示例

---
- name: Configure single server to forward syslog
  dellemc.openmanage.ome_application_alerts_syslog:
    hostname: 192.168.0.1
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    syslog_servers:
      - id: 1
        enabled: true
        destination_address: 192.168.0.2
        port_number: 514

- name: Configure multiple server to forward syslog
  dellemc.openmanage.ome_application_alerts_syslog:
    hostname: 192.168.0.1
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    syslog_servers:
      - id: 1
        port_number: 523
      - id: 2
        enabled: true
        destination_address: sysloghost1.lab.com
      - id: 3
        enabled: false
      - id: 4
        enabled: true
        destination_address: 192.168.0.4
        port_number: 514

返回值

公共返回值已记录在 此处,以下是此模块特有的字段

描述

error_info

字典

HTTP 错误的详细信息。

返回:HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "由于请求包含无效的配置数量,无法更新Syslog设置。请求包含的配置不能超过4个,但当前包含5个。", "MessageArgs": ["4", "5"], "MessageId": "CAPP1108", "RelatedProperties": [], "Resolution": "仅输入消息中指定的所需数量的配置,然后重试操作。", "Severity": "Warning"}], "code": "Base.1.0.GeneralError", "message": "发生一般错误。请查看ExtendedInfo以获取更多信息。"}

msg

字符串

syslog转发操作的总体状态。

返回值: 始终返回

示例: "已成功更新syslog转发设置。"

syslog_details

列表 / 元素=字符串

已应用的Syslog转发设置列表。

返回值: 成功时返回

示例: [{"DestinationAddress": "192.168.10.43", "Enabled": false, "Id": 1, "PortNumber": 514}, {"DestinationAddress": "192.168.10.46", "Enabled": true, "Id": 2, "PortNumber": 514}, {"DestinationAddress": "192.168.10.44", "Enabled": true, "Id": 3, "PortNumber": 514}, {"DestinationAddress": "192.168.10.42", "Enabled": true, "Id": 4, "PortNumber": 515}]

作者

  • Jagadeesh N V(@jagadeeshnv)