dellemc.openmanage.omevv_vcenter_info 模块 – 获取所有或特定 OpenManage Enterprise vCenter 信息。

注意

此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install dellemc.openmanage。您需要其他要求才能使用此模块,请参阅 要求 以了解详情。

要在剧本中使用它,请指定: dellemc.openmanage.omevv_vcenter_info

dellemc.openmanage 9.8.0 中的新增功能

概要

  • 此模块允许您从 OpenManage Enterprise 获取所有或特定 vCenter 信息。

要求

在执行此模块的主机上需要以下要求。

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

dellemc.openmanage 5.0.0 中新增

包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。

hostname

字符串 / 必需

OpenManage Enterprise 或 OpenManage Enterprise Modular 的 IP 地址或主机名。

password

字符串

OpenManage Enterprise 或 OpenManage Enterprise Modular 密码。

如果未提供密码,则使用环境变量 OME_PASSWORD

示例:export OME_PASSWORD=password

port

整数

OpenManage Enterprise 或 OpenManage Enterprise Modular 的 HTTPS 端口。

默认值: 443

timeout

整数

dellemc.openmanage 5.0.0 中新增

以秒为单位的套接字级别超时。

默认值: 30

username

字符串

OpenManage Enterprise 或 OpenManage Enterprise Modular 用户名。

如果未提供用户名,则使用环境变量 OME_USERNAME

示例:export OME_USERNAME=username

validate_certs

布尔值

dellemc.openmanage 5.0.0 中新增

如果为 false,则不会验证 SSL 证书。

仅在使用自签名证书的个人控制站点上配置 false

在集合版本 5.0.0 之前,validate_certs 默认值为 false

选项

  • false

  • true ← (默认)

vcenter_hostname

字符串

vCenter 的 IP 地址或主机名。

如果提供 vcenter_hostname,则模块仅检索指定的 vCenter 信息。

x_auth_token

字符串

dellemc.openmanage 9.3.0 中新增

身份验证令牌。

如果未提供 x_auth_token,则使用环境变量 OME_X_AUTH_TOKEN

示例:export OME_X_AUTH_TOKEN=x_auth_token

属性

属性

支持

描述

check_mode

支持:完全支持

运行任务以进行验证,而无需对目标机器执行操作。

备注

注意

  • 此模块支持 IPv4 和 IPv6 地址。

示例

---
- name: Retrieve all vCenter information.
  dellemc.openmanage.omevv_vcenter_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "path/to/ca_file"

- name: Retrieve specific vCenter information.
  dellemc.openmanage.omevv_vcenter_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "path/to/ca_file"
    vcenter_hostname: xx.xx.xx.xx

返回值

常用返回值已在 此处 记录,以下是此模块特有的字段

描述

error_info

字典

HTTP 错误的详细信息。

返回: HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to process the request because an error occurred.", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information."}}

msg

字符串

检索操作的 vCenter 信息状态。

返回: 始终

示例: "Successfully retrieved the vCenter information."

vcenter_info

列表 / 元素=字典

关于 vCenter 的信息。

返回: 成功

示例: [{"consoleAddress": "vcenter_ip_or_hostname", "description": "vCenter 8.0", "registeredExtensions": ["PHM", "WEBCLIENT", "PHA", "VLCM"], "uuid": "77373c7e-d2b0-453b-9888-102499919bd1"}, {"consoleAddress": "vcenter_ip_or_hostname", "description": "vCenter 8.1", "registeredExtensions": ["PHM", "WEBCLIENT", "PHA", "VLCM"], "uuid": "77373c7e-d2b0-453b-9888-102499919bd2"}]

作者

  • Lovepreet Singh (@singh-lovepreet1)