dellemc.openmanage.ome_template_info 模块 – 从 OpenManage Enterprise 检索模板详细信息
注意
此模块是 dellemc.openmanage 集合(版本 9.9.0)的一部分。
如果您正在使用 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要进一步的要求才能使用此模块,请参阅 要求 了解详细信息。
要在 playbook 中使用它,请指定:dellemc.openmanage.ome_template_info。
dellemc.openmanage 2.0.0 中的新增功能
概要
- 此模块检索 OpenManage Enterprise 上所有模板的列表和详细信息。 
要求
执行此模块的主机需要满足以下要求。
- python >= 3.9.6 
参数
| 参数 | 注释 | 
|---|---|
| 包含用于验证的 CA 证书的 Privacy Enhanced Mail (PEM) 文件。 | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular IP 地址或主机名。 | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular 密码。 如果未提供密码,则使用环境变量  示例:export OME_PASSWORD=password | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular HTTPS 端口。 默认值:  | |
| 用于输出分页的选项。 | |
| 按支持的值过滤记录。 | |
| 模板的唯一 ID。 | |
| 以秒为单位的套接字级别超时。 默认值:  | |
| OpenManage Enterprise 或 OpenManage Enterprise Modular 用户名。 如果未提供用户名,则使用环境变量  示例:export OME_USERNAME=username | |
| 如果  仅在个人控制的站点(使用自签名证书)上配置  在集合版本  选项 
 | |
| 身份验证令牌。 如果未提供 x_auth_token,则使用环境变量  示例:export OME_X_AUTH_TOKEN=x_auth_token | 
注意
注意
- 从可以直接访问 Dell OpenManage Enterprise 的系统运行此模块。 
- 此模块支持 - check_mode。
示例
---
- name: Retrieve basic details of all templates
  dellemc.openmanage.ome_template_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
- name: Retrieve details of a specific template identified by its template ID
  dellemc.openmanage.ome_template_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    template_id: 1
- name: Get filtered template info based on name
  dellemc.openmanage.ome_template_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    system_query_options:
      filter: "Name eq 'new template'"
返回值
常见的返回值记录在 此处,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 总体模板事实状态。 返回:发生错误时 示例:  | |
| 模板的详细信息。 返回:成功时 示例:  | 
