community.general.oneview_san_manager_info 模块 – 获取一个或多个 OneView SAN 管理器的信息

注意

此模块是 community.general 集合(版本 10.1.0)的一部分。

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

要安装它,请使用:ansible-galaxy collection install community.general。您需要进一步的要求才能使用此模块,请参阅要求 了解详细信息。

要在 playbook 中使用它,请指定:community.general.oneview_san_manager_info

概要

  • 从 OneView 获取一个或多个 SAN 管理器的信息

要求

执行此模块的主机需要满足以下要求。

  • Python >= 2.7.9

  • hpOneView >= 2.0.1

参数

参数

注释

api_version

整数

OneView API 版本。

config

路径

包含 OneView 客户端配置的 JSON 配置文件的路径。配置文件是可选的,使用时应存在于运行 Ansible 命令的主机上。如果未提供文件路径,则配置将从环境变量加载。有关示例配置文件或如何使用环境变量的链接,请验证备注部分。

hostname

字符串

设备的 IP 地址或主机名。

image_streamer_hostname

字符串

HPE Image Streamer REST API 的 IP 地址或主机名。

params

字典

用于分隔、过滤和排序资源列表的参数列表。

允许的参数: - start:要返回的第一项,使用从 0 开始的索引。 - count:要返回的资源数。 - query:用于缩小返回的资源列表范围的通用查询字符串。 - sort:返回的数据集的排序顺序。

password

字符串

用于 API 身份验证的密码。

provider_display_name

字符串

提供程序显示名称。

username

字符串

用于 API 身份验证的用户名。

属性

属性

支持

描述

check_mode

支持: 完全

在 community.general 3.3.0 中添加

此操作不会修改状态。

可以在 check_mode 中运行,并返回已更改状态的预测,而无需修改目标。

diff_mode

支持: 不适用

此操作不会修改状态。

当处于差异模式时,将返回有关已更改(或可能需要在 check_mode 中更改)的详细信息。

备注

注意

示例

- name: Gather information about all SAN Managers
  community.general.oneview_san_manager_info:
    config: /etc/oneview/oneview_config.json
  delegate_to: localhost
  register: result

- name: Print fetched information about SAN Managers
  ansible.builtin.debug:
    msg: "{{ result.san_managers }}"

- name: Gather paginated, filtered and sorted information about SAN Managers
  community.general.oneview_san_manager_info:
    config: /etc/oneview/oneview_config.json
    params:
      start: 0
      count: 3
      sort: name:ascending
      query: isInternal eq false
  delegate_to: localhost
  register: result

- name: Print fetched information about paginated, filtered and sorted list of SAN Managers
  ansible.builtin.debug:
    msg: "{{ result.san_managers }}"

- name: Gather information about a SAN Manager by provider display name
  community.general.oneview_san_manager_info:
    config: /etc/oneview/oneview_config.json
    provider_display_name: Brocade Network Advisor
  delegate_to: localhost
  register: result

- name: Print fetched information about SAN Manager found by provider display name
  ansible.builtin.debug:
    msg: "{{ result.san_managers }}"

返回值

常见的返回值记录在这里,以下是此模块特有的字段

描述

san_managers

字典

包含关于 SAN 管理器的所有 OneView 信息。

返回: 总是返回,但可以为空。

作者

  • Felipe Bulsoni (@fgbulsoni)

  • Thiago Miotto (@tmiotto)

  • Adriane Cardozo (@adriane-cardozo)