ibm.storage_virtualize.ibm_svc_hostcluster 模块 – 此模块管理 IBM Storage Virtualize 系列系统上的主机集群

注意

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

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

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

要在剧本中使用它,请指定: ibm.storage_virtualize.ibm_svc_hostcluster

ibm.storage_virtualize 1.5.0 中的新增功能

概要

  • 用于管理“mkhostcluster”、“chhostcluster”和“rmhostcluster”主机命令的 Ansible 接口。

参数

参数

注释

clustername

字符串 / 必需

Storage Virtualize 系统的主机名或管理 IP。

domain

字符串

Storage Virtualize 系统的域名。

当主机名用于参数 *clustername* 时有效。

log_path

字符串

调试日志文件的路径。

name

字符串 / 必需

指定新主机集群对象的名称或标签。

noownershipgroup

布尔值

在 ibm.storage_virtualize 1.6.0 中添加

如果指定为 True,则主机集群对象将从其所属的所有权组中删除。

参数 *ownershipgroup* 和 *noownershipgroup* 是互斥的。

当 *state=present* 用于修改现有主机集群时适用。

选项

  • false

  • true

ownershipgroup

字符串

在 ibm.storage_virtualize 1.6.0 中添加

将主机集群对象添加到其中的所有权组的名称。

参数 *ownershipgroup* 和 *noownershipgroup* 是互斥的。

当 *state=present* 时适用。

password

字符串

Storage Virtualize 系统的 REST API 密码。

如果不使用 *token* 来验证用户,则参数 *username* 和 *password* 是必需的。

removeallhosts

布尔值

指定删除主机集群中的所有主机和关联的主机集群对象。

当 *state=absent* 时适用。

选项

  • false

  • true

state

字符串 / 必需

创建 (present) 或删除 (absent) 主机集群。

选项

  • "absent"

  • "present"

token

字符串

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

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

username

字符串

Storage Virtualize 系统的 REST API 用户名。

如果不使用 *token* 来验证用户,则参数 *username* 和 *password* 是必需的。

validate_certs

布尔值

验证证书。

选项

  • false ← (默认)

  • true

备注

注意

  • 此模块支持 check_mode

示例

- name: Define a new host cluster
  ibm.storage_virtualize.ibm_svc_hostcluster:
    clustername: "{{clustername}}"
    domain: "{{domain}}"
    username: "{{username}}"
    password: "{{password}}"
    log_path: /tmp/playbook.debug
    name: hostcluster0
    state: present
    ownershipgroup: group1
- name: Update the ownershipgroup of a host cluster
  ibm.storage_virtualize.ibm_svc_hostcluster:
    clustername: "{{clustername}}"
    domain: "{{domain}}"
    username: "{{username}}"
    password: "{{password}}"
    log_path: /tmp/playbook.debug
    name: hostcluster0
    state: present
    noownershipgroup: True
- name: Delete a host cluster
  ibm.storage_virtualize.ibm_svc_hostcluster:
    clustername: "{{clustername}}"
    domain: "{{domain}}"
    username: "{{username}}"
    password: "{{password}}"
    log_path: /tmp/playbook.debug
    name: hostcluster0
    state: absent
    removeallhosts: True

作者

  • Shilpi Jain (@Shilpi-J)