ibm.spectrum_virtualize.ibm_svc_manage_ip 模块 – 此模块管理 IBM Spectrum Virtualize 系列存储系统上的 IP 配置

注意

此模块是 ibm.spectrum_virtualize 集合 (版本 2.0.0) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install ibm.spectrum_virtualize

要在 playbook 中使用它,请指定: ibm.spectrum_virtualize.ibm_svc_manage_ip

注意

ibm.spectrum_virtualize 集合已重命名为 ibm.storage_virtualize ,并将从 Ansible 12 中移除。如果您使用 ibm.spectrum_virtualize 中的内容,请更新 playbook 和角色中的 FQCN!创建新的 playbook 或角色时,请直接使用 ibm.storage_virtualize 中的内容。

ibm.spectrum_virtualize 1.8.0 中的新增功能

概要

  • 用于管理“mkip”和“rmip”命令的 Ansible 接口。

  • 此模块可以在所有运行 8.4.2.0 或更高版本的 IBM Spectrum Virtualize 存储上运行。

参数

参数

注释

clustername

字符串 / 必需

Spectrum Virtualize 存储系统的hostname或管理IP。

domain

字符串

Spectrum Virtualize 存储系统的域名。

当参数 *clustername* 使用 hostname 时有效。

gateway

字符串

指定网关地址。

在 *state=present* 时适用。

ip_address

字符串 / 必需

指定有效的 ipv4/ipv6 地址。

log_path

字符串

调试日志文件的路径。

node

字符串 / 必需

指定节点的名称。

password

字符串

Spectrum Virtualize 存储系统的 REST API 密码。

如果不使用 *token* 认证用户,则需要 *username* 和 *password* 参数。

port

整数 / 必需

指定要分配 IP 的端口范围(1-16)。

portset

字符串

指定 portset 对象的名称。

shareip

布尔值

指定 IP 在多个 portset 之间共享时的标志。

在 *state=present* 时适用。

选项

  • false

  • true

state

字符串 / 必需

创建 (present) 或删除 (absent) IP 地址。

选项

  • "present"

  • "absent"

subnet_prefix

整数

指定子网掩码的前缀。

在 *state=present* 时适用。

token

字符串

用于验证 Spectrum Virtualize 存储系统上用户的身份验证令牌。

要生成令牌,请使用 ibm_svc_auth 模块。

username

字符串

Spectrum Virtualize 存储系统的 REST API 用户名。

如果不使用 *token* 认证用户,则需要 *username* 和 *password* 参数。

validate_certs

布尔值

验证证书。

选项

  • false ← (默认)

  • true

vlan

整数

指定 VLAN ID 范围(1-4096)。

在 *state=present* 时适用。

备注

注意

  • 此模块支持 check_mode

示例

- name: Create IP provisioning
  ibm.spectrum_virtualize.ibm_svc_manage_ip:
   clustername: "{{cluster}}"
   username: "{{username}}"
   password: "{{password}}"
   log_path: /tmp/playbook.debug
   node: node1
   port: 1
   portset: portset0
   ip_address: x.x.x.x
   subnet_prefix: 20
   gateway: x.x.x.x
   vlan: 1
   shareip: true
   state: present
- name: Remove IP provisioning
  ibm.spectrum_virtualize.ibm_svc_manage_ip:
   clustername: "{{cluster}}"
   username: "{{username}}"
   password: "{{password}}"
   log_path: /tmp/playbook.debug
   node: node1
   port: 1
   portset: portset0
   ip_address: x.x.x.x
   state: absent

作者

  • Sreshtant Bohidar(@Sreshtant-Bohidar)