purestorage.flasharray.purefa_logging 模块 – 管理 Pure Storage FlashArray 审计和会话日志

注意

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

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

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

要在 playbook 中使用它,请指定:purestorage.flasharray.purefa_logging

purestorage.flasharray 1.19.0 中的新增功能

概要

  • 查看 FlashArray 审计跟踪或会话日志,根据(开始)时间从新到旧排序

需求

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

  • python >= 3.3

  • purestorage >= 1.19

  • py-pure-client >= 1.26.0

  • netaddr

  • requests

  • pycountry

  • urllib3

参数

参数

注释

api_token

字符串

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

disable_warnings

布尔值

在 purestorage.flasharray 1.29.0 中添加

禁用调试日志中的不安全证书警告

选项

  • false ← (默认)

  • true

fa_url

字符串

FlashArray 管理 IPv4 地址或主机名。

limit

整数

返回的审计事件的最大数量

默认值: 1000

log_type

字符串

要查看的日志类型

选项

  • "audit" ← (默认)

  • "session"

注释

注意

  • 此模块需要 purestoragepy-pure-client Python 库

  • 特定模块可能需要其他 Python 库。

  • 如果未将 *fa_url* 和 *api_token* 参数直接传递给模块,则必须设置 PUREFA_URLPUREFA_API 环境变量

示例

- name: List last 100 audit events
  purestorage.flasharray.purefa_logging:
    limit: 100
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: List last 24 session events
  purestorage.flasharray.purefa_logging:
    limit: 24
    log_type: session
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

作者

  • Pure Storage Ansible 团队 (@sdodsley)