community.general.oneview_logical_interconnect_group_info 模块 – 获取一个或多个 OneView 逻辑互连组的信息
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您正在使用 ansible
包,您可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.general
。您需要进一步的要求才能使用此模块,请参阅 要求 了解详细信息。
要在 Playbook 中使用它,请指定:community.general.oneview_logical_interconnect_group_info
。
概要
从 OneView 中检索一个或多个逻辑互连组的信息
要求
执行此模块的主机需要满足以下要求。
Python >= 2.7.9
hpOneView >= 2.0.1
参数
参数 |
注释 |
---|---|
OneView API 版本。 |
|
JSON 配置文件的路径,其中包含 OneView 客户端配置。配置文件是可选的,如果使用,则应位于运行 ansible 命令的主机上。如果未提供文件路径,则将从环境变量加载配置。有关示例配置文件或如何使用环境变量的链接,请验证注释部分。 |
|
设备的 IP 地址或主机名。 |
|
HPE Image Streamer REST API 的 IP 地址或主机名。 |
|
逻辑互连组名称。 |
|
用于分隔、筛选和排序资源列表的参数列表。 允许的参数键为
|
|
用于 API 身份验证的密码。 |
|
用于 API 身份验证的用户名。 |
属性
属性 |
支持 |
描述 |
---|---|---|
支持:完全 在 community.general 3.3.0 中添加 此操作不会修改状态。 |
可以在 |
|
支持: 不适用 此操作不会修改状态。 |
在差异模式下运行时,将返回有关已更改(或可能需要在 |
注释
注意
config 参数的示例配置文件可以在以下位置找到:https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json
查看如何使用环境变量进行配置:https://github.com/HewlettPackard/oneview-ansible#environment-variables
HPE OneView Ansible 模块的其他 Playbook 可以在以下位置找到:https://github.com/HewlettPackard/oneview-ansible/tree/master/examples
使用的 OneView API 版本将直接影响资源中返回和期望的字段。有关设置所需 API 版本的信息可以在以下位置找到:https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version
示例
- name: Gather information about all Logical Interconnect Groups
community.general.oneview_logical_interconnect_group_info:
hostname: 172.16.101.48
username: administrator
password: my_password
api_version: 500
no_log: true
delegate_to: localhost
register: result
- name: Print fetched information about Logical Interconnect Groups
ansible.builtin.debug:
msg: "{{ result.logical_interconnect_groups }}"
- name: Gather paginated, filtered and sorted information about Logical Interconnect Groups
community.general.oneview_logical_interconnect_group_info:
params:
start: 0
count: 3
sort: name:descending
filter: name=LIGName
hostname: 172.16.101.48
username: administrator
password: my_password
api_version: 500
no_log: true
delegate_to: localhost
register: result
- name: Print fetched information about paginated, filtered and sorted list of Logical Interconnect Groups
ansible.builtin.debug:
msg: "{{ result.logical_interconnect_groups }}"
- name: Gather information about a Logical Interconnect Group by name
community.general.oneview_logical_interconnect_group_info:
name: logical interconnect group name
hostname: 172.16.101.48
username: administrator
password: my_password
api_version: 500
no_log: true
delegate_to: localhost
register: result
- name: Print fetched information about Logical Interconnect Group found by name
ansible.builtin.debug:
msg: "{{ result.logical_interconnect_groups }}"
返回值
通用返回值记录在此处,以下是此模块独有的字段
键 |
描述 |
---|---|
包含有关逻辑互连组的所有 OneView 信息。 返回:始终,但可以为空。 |