purestorage.flasharray.purefa_syslog 模块 – 配置 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_syslog。
purestorage.flasharray 1.0.0 中的新增功能
概要
- 配置 Pure Storage FlashArrays 的系统日志配置。 
- 管理单个系统日志服务器。 
要求
执行此模块的主机上需要以下要求。
- python >= 3.3 
- purestorage >= 1.19 
- py-pure-client >= 1.26.0 
- netaddr 
- requests 
- pycountry 
- urllib3 
参数
| 参数 | 注释 | 
|---|---|
| 系统日志服务器地址。此字段支持 IPv4、IPv6 或 FQDN。无效的 IP 地址将导致模块失败。不对 FQDN 执行验证。 | |
| 具有管理员权限的用户的 FlashArray API 令牌。 | |
| 禁用调试日志中的不安全证书警告 选择 
 | |
| FlashArray 管理 IPv4 地址或主机名。 | |
| 用户指定的名称。该名称必须在本地唯一,并且不能更改。 | |
| 服务器正在侦听的端口。如果未指定端口,系统将使用 514 | |
| 服务器使用的协议 选择 
 | |
| 创建、更新、删除或测试系统日志服务器配置 选择 
 | 
注释
注意
- 此模块需要 - purestorage和- py-pure-clientPython 库
- 特定模块可能需要其他 Python 库。 
- 如果未将 fa_url 和 api_token 参数直接传递给模块,则必须设置 - PUREFA_URL和- PUREFA_API环境变量
示例
- name: Delete existing syslog server entry
  purestorage.flasharray.purefa_syslog:
    name: syslog1
    address: syslog1.com
    protocol: tcp
    state: absent
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add syslog server entry
  purestorage.flasharray.purefa_syslog:
    name: syslog1
    address: syslog1.com
    port: 8081
    protocol: udp
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update syslog server entry
  purestorage.flasharray.purefa_syslog:
    name: syslog1
    address: syslog1.com
    port: 8081
    protocol: tcp
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
