dellemc.openmanage.idrac_boot 模块 – 配置引导顺序设置。

注意

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

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

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

要在 playbook 中使用它,请指定:dellemc.openmanage.idrac_boot

dellemc.openmanage 6.1.0 中新增

概要

  • 此模块允许配置引导顺序设置。

要求

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

  • python >= 3.9.6

参数

参数

注释

boot_options

列表 / 元素=字典

启用或禁用引导设备的选项。

这与 boot_orderboot_source_override_modeboot_source_override_enabledboot_source_override_targetuefi_target_boot_source_override 互斥。

boot_option_reference

字符串

引导设备的 FQDD。

这与 display_name 互斥。

display_name

字符串

引导源设备的显示名称。

这与 boot_option_reference 互斥。

enabled

布尔值 / 必需

启用或禁用引导设备。

选择

  • false

  • true

boot_order

列表 / 元素=字符串

此选项允许按所需的引导顺序序列设置引导设备。

这与 boot_options 互斥。

boot_source_override_enabled

字符串

引导源覆盖功能的状态。

disabled 系统正常启动。

once 系统(一次)启动到 boot_source_override_target

continuous 系统启动到 boot_source_override_target 中指定的目标,直到此属性设置为“禁用”。

状态设置为 once 用于一次性引导覆盖,continuous 用于保持活动状态直到取消的覆盖。如果状态设置为 oncecontinuous,则在 boot_source_override_target 操作成功完成后,该值将重置为 disabled

对此选项的更改不会更改 BIOS 持久性引导顺序配置。

这与 boot_options 互斥。

选择

  • "continuous"

  • "disabled"

  • "once"

boot_source_override_mode

字符串

当从 boot_source_override_target 引导源启动时使用的 BIOS 引导模式(传统或 UEFI)。

legacy 系统在非 UEFI(传统)引导模式下启动到 boot_source_override_target

uefi 系统在 UEFI 引导模式下启动到 boot_source_override_target

这与 boot_options 互斥。

选择

  • "legacy"

  • "uefi"

boot_source_override_target

字符串

在下次引导期间使用的引导源覆盖目标设备,而不是正常的引导设备。

pxe 从主 NIC 执行 PXE 引导。

floppycdhddsd_card 分别从其设备执行引导。

bios_setup 执行引导进入本机 BIOS 设置。

utilities 从本地实用程序执行引导。

uefi_targetuefi_target_boot_source_override 中找到的 UEFI 设备路径执行引导。

如果 boot_source_override_target 设置为 none 以外的值,则 boot_source_override_enabled 会自动设置为 once

对此选项的更改不会更改 BIOS 持久性引导顺序配置。

这与 boot_options 互斥。

选择

  • "uefi_http"

  • "sd_card"

  • "uefi_target"

  • "utilities"

  • "bios_setup"

  • "hdd"

  • "cd"

  • "floppy"

  • "pxe"

  • "none"

ca_path

路径

在 dellemc.openmanage 5.0.0 中添加

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

idrac_ip

字符串 / 必需

iDRAC IP 地址。

idrac_password

别名:idrac_pwd

字符串

iDRAC 用户密码。

如果未提供密码,则使用环境变量 IDRAC_PASSWORD

示例:export IDRAC_PASSWORD=password

idrac_port

整数

iDRAC 端口。

默认值: 443

idrac_user

字符串

iDRAC 用户名。

如果未提供用户名,则使用环境变量 IDRAC_USERNAME

示例:export IDRAC_USERNAME=username

job_wait

布尔值

提供等待作业完成的选项。

reset_typeforce_resetgraceful_reset 时,此项适用。

选择

  • false

  • true ← (默认)

job_wait_timeout

整数

job_wait 的最大等待时间,单位为秒。作业仅在此持续时间内被跟踪。

job_waittrue 时,此选项适用。

默认值: 900

reset_type

字符串

none 主机系统不重启,且 job_wait 不适用。

force_restart 强制重启主机系统。

graceful_restart 优雅地重启主机系统。

选择

  • "graceful_restart" ← (默认)

  • "force_restart"

  • "none"

resource_id

字符串

资源的 Redfish ID。

timeout

整数

在 dellemc.openmanage 5.0.0 中添加

套接字级别的超时时间,单位为秒。

默认值: 30

uefi_target_boot_source_override

字符串

boot_source_override_targetuefi_target 时,从中启动的设备的 UEFI 设备路径。

如果 boot_source_override_target 设置为 uefi_target,则 boot_source_override_enabled 不能设置为 c(continuous),因为此设置在 UEFI 中被定义为一次性启动设置。

对此选项的更改不会更改 BIOS 持久性引导顺序配置。

如果 boot_source_override_targetuefi_target,则此为必需项。

这与 boot_options 互斥。

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,则使用环境变量 IDRAC_X_AUTH_TOKEN

示例:export IDRAC_X_AUTH_TOKEN=x_auth_token

注释

注意

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

  • 此模块支持 check_mode

示例

---
- name: Configure the system boot options settings.
  dellemc.openmanage.idrac_boot:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_options:
      - display_name: Hard drive C
        enabled: true
      - boot_option_reference: NIC.PxeDevice.2-1
        enabled: true

- name: Configure the boot order settings.
  dellemc.openmanage.idrac_boot:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_order:
      - Boot0001
      - Boot0002
      - Boot0004
      - Boot0003

- name: Configure the boot source override mode.
  dellemc.openmanage.idrac_boot:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_source_override_mode: legacy
    boot_source_override_target: cd
    boot_source_override_enabled: once

- name: Configure the UEFI target settings.
  dellemc.openmanage.idrac_boot:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_source_override_mode: uefi
    boot_source_override_target: uefi_target
    uefi_target_boot_source_override: "VenHw(3A191845-5F86-4E78-8FCE-C4CFF59F9DAA)"

- name: Configure the boot source override mode as pxe.
  dellemc.openmanage.idrac_boot:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    boot_source_override_mode: legacy
    boot_source_override_target: pxe
    boot_source_override_enabled: continuous

返回值

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

描述

boot

字典

配置的启动设置详细信息。

返回:成功

示例: {"BootOptions": {"Description": "启动选项的集合", "Members": [{"BootOptionEnabled": false, "BootOptionReference": "HardDisk.List.1-1", "Description": "传统启动选项的当前设置", "DisplayName": "硬盘 C:", "Id": "HardDisk.List.1-1", "Name": "传统启动选项", "UefiDevicePath": "VenHw(D6C0639F-C705-4EB9-AA4F-5802D8823DE6)"}], "Name": "启动选项集合"}, "BootOrder": ["HardDisk.List.1-1"], "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "Legacy", "BootSourceOverrideTarget": "None", "UefiTargetBootSourceOverride": null}

error_info

字典

HTTP 错误的详细信息。

返回:发生 HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "由于发生错误,无法处理请求。", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "重试操作。如果问题仍然存在,请联系您的系统管理员。", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "发生了一般错误。有关更多信息,请参阅 ExtendedInfo。"}}

job

字典

配置的作业详细信息。

返回:成功

示例: {"ActualRunningStartTime": "2019-06-19T00:57:24", "ActualRunningStopTime": "2019-06-19T01:00:27", "CompletionTime": "2019-06-19T01:00:27", "Description": "作业实例", "EndTime": "TIME_NA", "Id": "JID_609237056489", "JobState": "Completed", "JobType": "BIOSConfiguration", "Message": "作业已成功完成。", "MessageArgs": [], "MessageId": "PR19", "Name": "配置:BIOS.Setup.1-1", "PercentComplete": 100, "StartTime": "2019-06-19T00:55:05", "TargetSettingsURI": null}

msg

字符串

已成功更新启动设置。

返回:成功

示例: "已成功更新启动设置。"

作者

  • Felix Stephen (@felixs88)