purestorage.flasharray.purefa_vlan 模块 – 管理 Pure Storage FlashArray 中的网络 VLAN 接口
注意
此模块是 purestorage.flasharray 集合 (版本 1.32.0) 的一部分。
如果您正在使用 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install purestorage.flasharray。您需要满足其他要求才能使用此模块,请参阅 要求 了解详细信息。
要在 Playbook 中使用它,请指定:purestorage.flasharray.purefa_vlan。
purestorage.flasharray 1.0.0 中的新增功能
概要
- 此模块管理 Pure Storage FlashArray 上的 VLAN 网络接口。 
要求
执行此模块的主机需要满足以下要求。
- python >= 3.3 
- purestorage >= 1.19 
- py-pure-client >= 1.26.0 
- netaddr 
- requests 
- pycountry 
- urllib3 
参数
| 参数 | 注释 | 
|---|---|
| 接口的 IPv4 或 IPv6 地址。 | |
| 具有管理员权限用户的 FlashArray API 令牌。 | |
| 在调试日志中禁用不安全的证书警告 选项 
 | |
| 定义是否启用 VLAN 接口。 选项 
 | |
| FlashArray 管理 IPv4 地址或主机名。 | |
| 接口名称,包括控制器标识符。 VLAN 仅在 iSCSI、NVMe-RoCE 和文件物理接口上受支持 | |
| 现有接口的状态(开启/关闭)。 选项 
 | |
| 与接口关联的子网名称。 | 
注释
注意
- 此模块需要 - purestorage和- py-pure-clientPython 库
- 特定模块可能需要其他 Python 库。 
- 如果未将 *fa_url* 和 *api_token* 参数直接传递给模块,则必须设置 - PUREFA_URL和- PUREFA_API环境变量
示例
- name: Configure and enable VLAN interface ct0.eth8 for subnet test
  purestorage.flasharray.purefa_vlan:
    name: ct0.eth8
    subnet: test
    address: 10.21.200.18
    state: present
    fa_url: 10.10.10.2
    api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Disable VLAN interface for subnet test on ct1.eth2
  purestorage.flasharray.purefa_vlan:
    name: ct1.eth2
    subnet: test
    enabled: false
    fa_url: 10.10.10.2
    api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Delete VLAN inteface for subnet test on ct0.eth4
  purestorage.flasharray.purefa_vlan:
    name: ct0.eth4
    subnet: test
    state: absent
    fa_url: 10.10.10.2
    api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
