purestorage.flasharray.purefa_subnet 模块 – 管理 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_subnet。
purestorage.flasharray 1.0.0 中的新功能
概要
- 此模块管理 Pure Storage FlashArray 上的网络子网。 
要求
在执行此模块的主机上需要以下要求。
- python >= 3.3 
- purestorage >= 1.19 
- py-pure-client >= 1.26.0 
- netaddr 
- requests 
- pycountry 
- urllib3 
参数
| 参数 | 注释 | 
|---|---|
| 具有管理员权限用户的 FlashArray API 令牌。 | |
| 在调试日志中禁用不安全证书警告 选择 
 | |
| 子网是否应启用 选择 
 | |
| FlashArray 管理 IPv4 地址或主机名。 | |
| 子网网关的 IPv4 或 IPv6 地址。 | |
| 子网的 MTU 大小。范围为 568 到 9000。 | |
| 子网名称。 | |
| 设置要与子网关联的 IPv4 或 IPv6 地址。 | |
| 创建或删除子网。 选择 
 | |
| VLAN ID。范围为 0 到 4094。 | 
注释
注意
- 此模块需要 - purestorage和- py-pure-clientPython 库
- 特定模块可能需要其他 Python 库。 
- 如果未直接将 fa_url 和 api_token 参数传递给模块,则必须设置 - PUREFA_URL和- PUREFA_API环境变量
示例
- name: Create subnet subnet100
  purestorage.flasharray.purefa_subnet:
    name: subnet100
    vlan: 100
    gateway: 10.21.200.1
    prefix: "10.21.200.0/24"
    mtu: 9000
    state: present
    fa_url: 10.10.10.2
    api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Disable subnet subnet100
  purestorage.flasharray.purefa_subnet:
    name: subnet100
    enabled: false
    fa_url: 10.10.10.2
    api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Delete subnet subnet100
  purestorage.flasharray.purefa_subnet:
    name: subnet100
    state: absent
    fa_url: 10.10.10.2
    api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
