netapp_eseries.santricity.na_santricity_alerts 模块 – NetApp E 系列管理电子邮件通知设置

注意

此模块是 netapp_eseries.santricity 集合 (版本 1.4.1) 的一部分。

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

要安装它,请使用:ansible-galaxy collection install netapp_eseries.santricity

要在 playbook 中使用它,请指定:netapp_eseries.santricity.na_santricity_alerts

概要

  • 某些 E 系列系统能够在潜在的严重事件发生时发送电子邮件通知。

  • 此模块允许系统所有者指定这些邮件的电子邮件收件人。

参数

参数

注释

api_password

字符串 / 必需

用于对 SANtricity Web Services Proxy 或嵌入式 Web Services API 进行身份验证的密码。

api_url

字符串 / 必需

SANtricity Web Services Proxy 或嵌入式 Web Services API 的 URL。

示例 https://prod-1.wahoo.acme.com:8443/devmgr/v2

api_username

字符串 / 必需

用于对 SANtricity Web Services Proxy 或嵌入式 Web Services API 进行身份验证的用户名。

contact

字符串

允许所有者指定一些自由格式的联系信息,这些信息将包含在电子邮件中。

这通常用于提供联系电话号码。

recipients

列表 / 元素=字符串

将接收电子邮件通知的电子邮件地址。

state=enabled 时必需。

sender

字符串

这是收件人将看到的发送者。它不一定是有效的电子邮件帐户。

state=enabled 时必需。

server

字符串

邮件服务器的完全限定域名、IPv4 地址或 IPv6 地址。

要使用完全限定域名,必须使用 netapp_eseries.santricity.na_santricity_mgmt_interface 在两个控制器上配置 DNS 服务器。- 当 state=enabled 时必需。

ssid

字符串

要管理的阵列的 ID。此值对于每个阵列必须唯一。

默认值: "1"

state

字符串

启用/禁用发送基于电子邮件的警报。

选项

  • "enabled" ← (默认)

  • "disabled"

test

布尔值

检测到配置更改时,将发送测试电子邮件。

这可能需要几分钟才能处理。

仅当 state=enabled 时适用。

选项

  • false ← (默认)

  • true

validate_certs

布尔值

是否应验证 https 证书?

选项

  • false

  • true ← (默认)

备注

注意

  • 支持检查模式。

  • 可警报的消息是存储系统主要事件日志 (MEL) 显示的消息的子集。可警报消息的示例包括驱动器故障、控制器故障、冗余丢失以及其他警告/严重事件。

  • 此 API 当前仅支持嵌入式 Web Services API v2.0 和更高版本。

  • E 系列 Ansible 模块需要 Web Services Proxy (WSP) 实例可用以管理存储系统,或者支持嵌入式 Web Services API 的 E 系列存储系统。

  • 嵌入式 Web Services 目前适用于 E2800、E5700、EF570 和更新的硬件型号。

  • netapp_eseries.santricity.netapp_e_storage_system 可用于配置由 WSP 实例管理的系统。

示例

- name: Enable email-based alerting
  na_santricity_alerts:
    state: enabled
    sender: [email protected]
    server: [email protected]
    contact: "Phone: 1-555-555-5555"
    recipients:
        - [email protected]
        - [email protected]
    api_url: "10.1.1.1:8443"
    api_username: "admin"
    api_password: "myPass"

- name: Disable alerting
  na_santricity_alerts:
    state: disabled
    api_url: "10.1.1.1:8443"
    api_username: "admin"
    api_password: "myPass"

返回值

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

描述

msg

字符串

成功消息

返回:成功时

示例: "The settings have been updated."

作者

  • Michael Price (@lmprice)

  • Vu Tran (@VuTran007)