purestorage.flasharray.purefa_default_protection 模块 – 管理 Pure Storage FlashArray 的 SafeMode 默认保护
注意
此模块是 purestorage.flasharray 集合 (版本 1.32.0) 的一部分。
如果您使用的是 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install purestorage.flasharray。您需要其他要求才能使用此模块,请参阅 要求 获取详细信息。
要在剧本中使用它,请指定: purestorage.flasharray.purefa_default_protection。
purestorage.flasharray 1.14.0 中的新增功能
概要
- 配置对新卷和已复制卷的阵列范围或 Pod 级别的自动保护组成员资格。 
- 需要至少 Purity 6.3.4 
要求
执行此模块的主机需要以下要求。
- python >= 3.3 
- purestorage >= 1.19 
- py-pure-client >= 1.26.0 
- netaddr 
- requests 
- pycountry 
- urllib3 
参数
| 参数 | 注释 | 
|---|---|
| 具有管理员权限用户的 FlashArray API 令牌。 | |
| 禁用调试日志中的不安全证书警告 选项 
 | |
| FlashArray 管理 IPv4 地址或主机名。 | |
| 要为作用域分配或删除作为默认值的保护组的名称。 如果 *作用域* 为 *pod*,则只需要 pod 保护组的短名称。参见示例 | |
| 应用默认保护的 pod 名称。 仅当 *作用域* 为 *pod* 时才需要 | |
| 默认保护组的作用域 选项 
 | |
| 定义是将保护组添加到默认列表还是从中删除。 选项 
 | 
备注
注意
- 此模块需要 - purestorage和- py-pure-clientPython 库
- 特定模块可能需要其他 Python 库。 
- 如果未将 *fa_url* 和 *api_token* 参数直接传递给模块,则必须设置 - PUREFA_URL和- PUREFA_API环境变量
示例
- name: Add protection group foo::bar as default for pod foo
  purestorage.flasharray.purefa_default_protection:
    name: bar
    pod: foo
    scope: pod
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add protection group foo as default for array
  purestorage.flasharray.purefa_default_protection:
    name: foo
    scope: array
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Remove protection group foo from array default protection
  purestorage.flasharray.purefa_default_protection:
    name: foo
    scope: array
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: absent
- name: Clear default protection for the array
  purestorage.flasharray.purefa_default_protection:
    name: ''
    scope: array
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: absent
