community.general.ilo_redfish_config 模块 – 使用 Redfish OEM 扩展设置或更新 HPE iLO 上的配置属性

注意

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

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

要安装它,请使用:ansible-galaxy collection install community.general

要在剧本中使用它,请指定:community.general.ilo_redfish_config

community.general 4.2.0 中的新增功能

概要

  • 在本地构建 Redfish URI 并将其发送到 iLO 以设置或更新配置属性。

  • 用于需要 Redfish OEM 扩展的 HPE iLO 操作。

参数

参数

注释

attribute_name

字符串 / 必需

要配置的属性的名称。

attribute_value

字符串

要配置的属性的值。

auth_token

字符串

用于向 iLO 进行身份验证的安全令牌。

baseuri

字符串 / 必需

iLO 的基本 URI。

category

字符串 / 必需

在 iLO 上执行的命令类别。

选项

  • "Manager"

command

列表 / 元素=字符串 / 必需

要在 iLO 上执行的命令列表。

password

字符串

用于向 iLO 进行身份验证的密码。

timeout

整数

对 iLO 的 HTTP 请求的超时时间(秒)。

默认值: 10

username

字符串

用于向 iLO 进行身份验证的用户名。

属性

属性

支持

描述

check_mode

支持:不支持

可以在 check_mode 下运行,并在不修改目标的情况下返回更改状态预测。

diff_mode

支持:不支持

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

示例

- name: Disable WINS Registration
  community.general.ilo_redfish_config:
    category: Manager
    command: SetWINSReg
    baseuri: 15.X.X.X
    username: Admin
    password: Testpass123
    attribute_name: WINSRegistration

- name: Set Time Zone
  community.general.ilo_redfish_config:
    category: Manager
    command: SetTimeZone
    baseuri: 15.X.X.X
    username: Admin
    password: Testpass123
    attribute_name: TimeZone
    attribute_value: Chennai

- name: Set NTP Servers
  community.general.ilo_redfish_config:
    category: Manager
    command: SetNTPServers
    baseuri: 15.X.X.X
    username: Admin
    password: Testpass123
    attribute_name: StaticNTPServers
    attribute_value: X.X.X.X

返回值

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

描述

msg

字符串

包含操作结果或错误描述的消息

返回:始终

示例: "Action was successful"

作者

  • Bhavya B (@bhavya06)