dellemc.openmanage.idrac_secure_boot 模块 – 配置属性、导入或导出安全启动证书以及重置密钥。
注意
此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install dellemc.openmanage
。您需要其他要求才能使用此模块,请参阅 需求 获取详细信息。
要在playbook中使用它,请指定: dellemc.openmanage.idrac_secure_boot
。
dellemc.openmanage 9.6.0中的新增功能
概要
此模块允许您执行以下操作。
导入或导出安全启动证书。
启用或禁用安全启动模式。
配置平台密钥 (PK) 和密钥交换密钥 (KEK) 策略
配置允许数据库 (DB) 和不允许数据库 (DBX) 证书。
重置UEFI安全启动密钥。
需求
执行此模块的主机需要以下需求。
python >= 3.9.6
参数
参数 |
注释 |
---|---|
iDRAC的启动模式。
选项
|
|
包含用于验证的CA证书的隐私增强邮件 (PEM) 文件。 |
|
UEFI安全启动的允许数据库(DB)证书文件的绝对路径列表。 当export_certificates为 |
|
UEFI安全启动的禁止数据库(DBX)证书文件的绝对路径列表。 当export_certificates为 |
|
将所有可用证书导出到指定目录中,用于给定的密钥。 export_cetificates与import互斥。 如果export_cetificates为 选项
|
|
确定系统BIOS是否从视频控制器加载旧版视频 (INT 10h) 选项ROM。 此参数仅在UEFI启动模式下受支持。如果启用了UEFI安全启动模式,则无法启用此参数。
选项
|
|
iDRAC IP地址。 |
|
iDRAC用户密码。 如果没有提供密码,则使用环境变量 示例:export IDRAC_PASSWORD=password |
|
iDRAC端口。 默认值: |
|
iDRAC用户名。 如果没有提供用户名,则使用环境变量 示例:export IDRAC_USERNAME=username |
|
导入所有指定的密钥证书。 当import_certificates为 选项
|
|
是否等待安全启动证书操作完成。这适用于restart为 选项
|
|
job_wait的最大等待时间(秒)。仅在此持续时间内跟踪作业。 此选项适用于job_wait为 默认值: |
|
UEFI安全启动的密钥交换密钥 (KEK) 证书文件的绝对路径列表。 当export_certificates为 |
|
UEFI安全启动的平台密钥证书文件的绝对路径。 当export_certificates为 |
|
重置UEFI安全启动密钥。
选项
|
|
安全启动证书导入操作需要服务器重启。此参数提供重启服务器的选项。
当import_certificates 为 只有当export_certificates 为 选项
|
|
服务器的重启类型。
当restart 为 选项
|
|
UEFI 安全启动。 只有当boot_mode 为
选项
|
|
UEFI 安全启动模式配置如何使用安全启动策略。
选项
|
|
以下是安全启动策略的类型。
当安全启动策略设置为自定义时,您可以执行以下操作,例如查看、导出、导入、删除、全部删除和重置策略。 选项
|
|
以秒为单位的套接字级别超时。 默认: |
|
如果为 仅在使用自签名证书的个人控制站点上配置 在集合版本 选项
|
|
身份验证令牌。 如果未提供 x_auth_token,则使用环境变量 示例:export IDRAC_X_AUTH_TOKEN=x_auth_token |
属性
属性 |
支持 |
描述 |
---|---|---|
支持:完全支持 |
运行任务以验证,无需对目标机器执行操作。 |
|
支持:不支持 |
运行任务以报告已进行或将要进行的更改。 |
备注
注意
在
check mode
下运行时,此模块将始终报告发现要应用于 import_certificates 的更改。当提供 reset_type 或 export_certificates 或 import_certificates 时,此模块不支持幂等性。
要配置安全启动设置,idrac_secure_boot 模块按以下顺序执行操作:设置属性、导出证书、重置密钥、导入证书和重启 iDRAC。
export_certificate 将导出剧本中定义的密钥的所有证书。
此模块仅针对序列中的最后一次操作考虑 restart 和 job_wait 的值。
此模块支持 IPv4 和 IPv6 地址。
只有 reset_keys 在 iDRAC8 上受支持。
示例
---
- name: Enable Secure Boot.
dellemc.openmanage.idrac_secure_boot:
idrac_ip: "192.168.1.2"
idrac_user: "user"
idrac_password: "password"
ca_path: "/path/to/ca_cert.pem"
secure_boot: "Enabled"
- name: Set Secure Boot mode, Secure Boot policy, and restart iDRAC.
dellemc.openmanage.idrac_secure_boot:
idrac_ip: "192.168.1.2"
idrac_user: "user"
idrac_password: "password"
ca_path: "/path/to/ca_cert.pem"
secure_boot: "Enabled"
secure_boot_mode: "UserMode"
secure_boot_policy: "Custom"
restart: true
restart_type: "GracefulRestart"
- name: Reset Secure Boot certificates.
dellemc.openmanage.idrac_secure_boot:
idrac_ip: "192.168.1.2"
idrac_user: "user"
idrac_password: "password"
ca_path: "/path/to/ca_cert.pem"
reset_keys: "ResetAllKeysToDefault"
- name: Export multiple Secure Boot certificate.
dellemc.openmanage.idrac_secure_boot:
idrac_ip: "192.168.1.2"
idrac_user: "user"
idrac_password: "password"
ca_path: "/path/to/ca_cert.pem"
export_certificates: true
platform_key: /user/name/export_cert/pk
KEK:
- /user/name/export_cert/kek
database:
- /user/name/export_cert/db
disallow_database:
- /user/name/export_cert/dbx
- name: Import multiple Secure Boot certificate without applying to iDRAC.
dellemc.openmanage.idrac_secure_boot:
idrac_ip: "192.168.1.2"
idrac_user: "user"
idrac_password: "password"
ca_path: "/path/to/ca_cert.pem"
import_certificates: true
platform_key: /user/name/certificates/pk.pem
KEK:
- /user/name/certificates/kek1.pem
- /user/name/certificates/kek2.pem
database:
- /user/name/certificates/db1.pem
- /user/name/certificates/db2.pem
disallow_database:
- /user/name/certificates/dbx1.pem
- /user/name/certificates/dbx2.pem
- name: Import a Secure Boot certificate and restart the server to apply it.
dellemc.openmanage.idrac_secure_boot:
idrac_ip: "192.168.1.2"
idrac_user: "user"
idrac_password: "password"
ca_path: "/path/to/ca_cert.pem"
import_certificates: true
platform_key: /user/name/certificates/pk.pem
restart: true
job_wait_timeout: 600
返回值
常见的返回值已记录在此处,以下是此模块特有的字段
键 |
描述 |
---|---|
HTTP 错误的详细信息。 返回:HTTP 错误时 示例: |
|
安全启动操作的状态。 返回:始终 示例: |