dellemc.openmanage.ome_firmware_baseline_compliance_info 模块 – 在 OpenManage Enterprise 上检索基线合规性详细信息

注意

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

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

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

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

dellemc.openmanage 2.0.0 中的新增功能

概要

  • 此模块允许检索 OpenManage Enterprise 上针对设备列表或指定基线的固件合规性。

要求

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

  • python >= 3.9.6

参数

参数

注释

baseline_name

字符串

基线的名称,将为其生成设备合规性报告。

此选项对于生成基于基线的设备合规性报告是强制性的。

baseline_namedevice_idsdevice_service_tagsdevice_group_names 互斥。

ca_path

路径

在 dellemc.openmanage 5.0.0 中添加

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

device_group_names

列表 / 元素=字符串

用于基于设备的合规性报告的组名称列表。

需要 device_idsdevice_service_tagsdevice_group_names 之一来生成基于设备的合规性报告。

device_group_namesdevice_idsdevice_service_tagsbaseline_name 互斥。

没有报告的设备将被忽略。

device_ids

列表 / 元素=整数

用于基于设备的合规性报告的唯一标识符列表。

需要 device_idsdevice_service_tagsdevice_group_names 之一来生成基于设备的合规性报告。

device_idsdevice_service_tagsdevice_group_namesbaseline_name 互斥。

没有报告的设备将被忽略。

device_service_tags

列表 / 元素=字符串

用于基于设备的合规性报告的服务标签列表。

需要 device_idsdevice_service_tagsdevice_group_names 之一来生成基于设备的合规性报告。

device_service_tagsdevice_idsdevice_group_namesbaseline_name 互斥。

没有报告的设备将被忽略。

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 ←(默认)

x_auth_token

字符串

在 dellemc.openmanage 9.3.0 中添加

身份验证令牌。

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

示例:export OME_X_AUTH_TOKEN=x_auth_token

注释

注意

  • 从可以直接访问 Dell OpenManage Enterprise 的系统运行此模块。

  • 此模块支持 check_mode

示例

---
- name: Retrieves device based compliance report for specified device IDs
  dellemc.openmanage.ome_firmware_baseline_compliance_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_ids:
      - 11111
      - 22222

- name: Retrieves device based compliance report for specified service Tags
  dellemc.openmanage.ome_firmware_baseline_compliance_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_service_tags:
      - MXL1234
      - MXL4567

- name: Retrieves device based compliance report for specified group names
  dellemc.openmanage.ome_firmware_baseline_compliance_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_group_names:
      - "group1"
      - "group2"

- name: Retrieves device compliance report for a specified baseline
  dellemc.openmanage.ome_firmware_baseline_compliance_info:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    baseline_name: "baseline_name"

返回值

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

描述

baseline_compliance_info

字典

基线合规性报告的详细信息。

已返回: 成功

示例: [{"CatalogId": 53, "ComplianceSummary": {"ComplianceStatus": "CRITICAL", "NumberOfCritical": 2, "NumberOfDowngrade": 0, "NumberOfNormal": 0, "NumberOfWarning": 0}, "Description": "", "DeviceComplianceReports": [{"ComplianceStatus": "CRITICAL", "ComponentComplianceReports": [{"ComplianceDependencies": [], "ComplianceStatus": "DOWNGRADE", "Criticality": "Ok", "CurrentVersion": "OSC_1.1", "Id": 1258, "ImpactAssessment": "", "Name": "OS COLLECTOR 2.1", "Path": "FOLDER04118304M/2/Diagnostics_Application_JCCH7_WN64_4.0_A00_01.EXE", "PrerequisiteInfo": "", "RebootRequired": false, "SourceName": "DCIM:INSTALLED#802__OSCollector.Embedded.1", "TargetIdentifier": "101734", "UniqueIdentifier": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "UpdateAction": "DOWNGRADE", "Uri": "http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverId=XXXXX", "Version": "4.0"}, {"ComplianceDependencies": [], "ComplianceStatus": "CRITICAL", "Criticality": "Recommended", "CurrentVersion": "DN02", "Id": 1259, "ImpactAssessment": "", "Name": "TOSHIBA AL14SE 1.8 TB 2.5 12Gb 10K 512n SAS HDD Drive", "Path": "FOLDER04086111M/1/SAS-Drive_Firmware_VDGFM_WN64_DN03_A00.EXE", "PrerequisiteInfo": "", "RebootRequired": true, "SourceName": "DCIM:INSTALLED#304_C_Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1", "TargetIdentifier": "103730", "UniqueIdentifier": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "UpdateAction": "UPGRADE", "Uri": "http://www.dell.com/support/home/us/en/19/Drivers/DriversDetails?driverId=XXXXX", "Version": "DN03"}], "DeviceId": 11603, "DeviceModel": "PowerEdge R630", "DeviceName": null, "DeviceTypeId": 1000, "DeviceTypeName": "CPGCGS", "FirmwareStatus": "Non-Compliant", "Id": 194, "RebootRequired": true, "ServiceTag": "MXL1234"}], "DowngradeEnabled": true, "Id": 53, "Is64Bit": false, "LastRun": "2019-09-27 05:08:16.301", "Name": "baseline1", "RepositoryId": 43, "RepositoryName": "catalog2", "RepositoryType": "CIFS", "Targets": [{"Id": 11603, "Type": {"Id": 1000, "Name": "DEVICE"}}], "TaskId": 11710, "TaskStatusId": 0}]

error_info

字典

HTTP 错误详情。

返回: 发生 HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "无法检索基准列表,原因是输入的设备 ID 无效", "Resolution": "请确保输入的设备 ID 有效,并重试操作。", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "发生了一般性错误。有关更多信息,请参阅 ExtendedInfo。"}}

msg

字符串

整体基准合规性报告状态。

返回: 发生错误时

示例: "无法获取合规性基准信息。"

作者

  • Sajna Shetty(@Sajna-Shetty)