ibm.storage_virtualize.ibm_svc_manage_ip 模块 – 此模块管理 IBM Storage Virtualize 系列系统上的 IP 配置

注意

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

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

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

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

ibm.storage_virtualize 1.8.0 中的新增功能

概要

  • 用于管理 ‘mkip’ 和 ‘rmip’ 命令的 Ansible 接口。

  • 此模块可以在运行 8.4.2.0 或更高版本的所有 IBM Storage Virtualize 系统上运行。

参数

参数

注释

clustername

字符串 / 必需

Storage Virtualize 系统的hostname或管理 IP。

domain

字符串

Storage Virtualize 系统的域。

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

gateway

字符串

指定网关地址。

当*state=present*时适用。

ip_address

字符串 / 必需

指定有效的 ipv4/ipv6 地址。

log_path

字符串

调试日志文件的路径。

node

字符串 / 必需

指定节点的名称。

password

字符串

Storage 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

字符串

用于验证 Storage Virtualize 系统上用户的身份验证令牌。

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

username

字符串

Storage Virtualize 系统的 REST API 用户名。

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

validate_certs

布尔值

验证证书。

选项

  • false ← (默认)

  • true

vlan

整数

指定 vlan id,范围为 1 - 4096。

当*state=present*时适用。

注意

注意

  • 此模块支持 check_mode

示例

- name: Create IP provisioning
  ibm.storage_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.storage_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)