purestorage.flashblade.purefb_alert 模块 – 配置 Pure Storage FlashBlade 告警电子邮件设置

注意

此模块是 purestorage.flashblade 集合(版本 1.19.1)的一部分。

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

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

要在剧本中使用它,请指定: purestorage.flashblade.purefb_alert

purestorage.flashblade 1.0.0 中的新增功能

概要

  • 配置 Pure Storage FlashArrays 的告警电子邮件配置。

  • 将单个 syslog 服务器添加到现有服务器列表中或从中删除。

要求

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

  • python >= 3.9

  • py-pure-client

  • purity_fb >= 1.12.2

  • netaddr

  • datetime

  • pytz

  • distro

  • pycountry

  • urllib3

参数

参数

注释

address

字符串 / 必需

电子邮件地址(需要有效格式)

api_token

字符串

具有管理员权限的用户的 FlashBlade API 令牌。

disable_warnings

布尔值

在 purestorage.flashblade 1.18.0 中添加

禁用不安全证书警告

选择

  • false ← (默认)

  • true

enabled

布尔值

将指定的电子邮件地址设置为启用或禁用

选择

  • false

  • true ← (默认)

fb_url

字符串

FlashBlade 管理 IP 地址或主机名。

severity

字符串

为了将电子邮件发送到阵列的告警监视器,告警必须具有的最低严重性

选择

  • "info" ← (默认)

  • "warning"

  • "critical"

state

字符串

创建或删除告警电子邮件

选择

  • "absent"

  • "present" ← (默认)

注意事项

注意

  • 此模块需要 purity_fb Python 库

  • 如果未将 fb_urlapi_token 参数直接传递给模块,则必须设置 PUREFB_URLPUREFB_API 环境变量

示例

- name: Add new email recipient and enable, or enable existing email
  purestorage.flashblade.purefb_alert:
    address: "[email protected]"
    enabled: true
    state: present
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete existing email recipient
  purestorage.flashblade.purefb_alert:
    state: absent
    address: "[email protected]"
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

作者

  • Pure Storage Ansible 团队 (@sdodsley)