dellemc.openmanage.idrac_reset 模块 – 将 iDRAC 重置为出厂设置
注意
此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装它,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage
。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在剧本中使用它,请指定:dellemc.openmanage.idrac_reset
。
dellemc.openmanage 2.1.0 中的新增功能
概要
此模块将 iDRAC 重置为出厂默认设置。
要求
执行此模块的主机需要以下要求。
python >= 3.9.6
参数
参数 |
注释 |
---|---|
包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 |
|
此参数提供了一个选项,可以以 XML 格式导入缓冲区输入作为自定义默认配置。 此选项适用于 _reset_to_default_ 为 custom_defaults_buffer 与 custom_defaults_file 互斥。 |
|
XML 格式的自定义默认配置文件的名称。 此选项适用于 _reset_to_default_ 为 custom_defaults_file 与 custom_defaults_buffer 互斥。 |
|
此参数仅在 reset_to_default 为 此参数是跟踪重置操作执行后服务器的生命周期状态所必需的。如果没有提供此参数,则在重置操作后不会跟踪生命周期状态。 |
|
此参数仅在 reset_to_default 为 此参数是跟踪重置操作执行后服务器的生命周期状态所必需的。如果没有提供此参数,则在重置操作后不会跟踪生命周期状态。 |
|
此参数提供了一个选项,可以在不检查 iDRAC 生命周期控制器状态的情况下强制重置 iDRAC。 此选项仅适用于 iDRAC9。 选项
|
|
iDRAC IP 地址。 |
|
iDRAC 用户密码。 如果没有提供密码,则使用环境变量 示例:export IDRAC_PASSWORD=password |
|
iDRAC 端口。 默认值: |
|
iDRAC 用户名。 如果没有提供用户名,则使用环境变量 示例:export IDRAC_USERNAME=username |
|
等待作业完成的时间(秒)。 这适用于 _wait_for_idrac_ 为 默认值: |
|
如果未设置此值,则默认行为是重新启动 iDRAC。
选项
|
|
套接字级别超时(秒)。 默认值: |
|
如果为 仅在使用自签名证书的个人控制站点上配置 在集合版本 选项
|
|
此参数提供了一个选项,用于等待 iDRAC 重置并将生命周期控制器状态设置为就绪。 选项
|
|
身份验证令牌。 如果没有提供 x_auth_token,则使用环境变量 示例:export IDRAC_X_AUTH_TOKEN=x_auth_token |
备注
注意
从此模块可以直接访问 Dell iDRAC 的系统运行此模块。
此模块支持 _idrac_ip_ 的 IPv4 和 IPv6 地址。
此模块支持
check_mode
。如果未指定reset_to_default选项,则此模块将触发优雅重启。
如果iDRAC不支持重置选项,则此模块将跳过执行。
示例
---
- name: Reset the iDRAC to default and do not wait till the iDRAC is accessible.
dellemc.openmanage.idrac_reset:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
reset_to_default: "Default"
wait_for_idrac: false
- name: Reset the iDRAC to All and wait for lifecycle controller status to be ready.
dellemc.openmanage.idrac_reset:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
reset_to_default: "All"
wait_for_idrac: true
default_username: "user_name"
default_password: "user_password"
- name: Force reset the iDRAC to default.
dellemc.openmanage.idrac_reset:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
reset_to_default: "Default"
force_reset: true
- name: Gracefully restart the iDRAC.
dellemc.openmanage.idrac_reset:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
- name: Reset the iDRAC to custom defaults XML and do not wait till the iDRAC is accessible.
dellemc.openmanage.idrac_reset:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
reset_to_default: "CustomDefaults"
custom_defaults_file: "/path/to/custom_defaults.xml"
- name: Reset the iDRAC to custom defaults buffer input and do not wait till the iDRAC is accessible.
dellemc.openmanage.idrac_reset:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
ca_path: "/path/to/ca_cert.pem"
reset_to_default: "CustomDefaults"
custom_defaults_buffer: "<SystemConfiguration Model=\"PowerEdge R7525\" ServiceTag=\"ABCD123\">\n<Component FQDD=\"iDRAC.Embedded.1\">\n
<Attribute Name=\"IPMILan.1#Enable\">Disabled</Attribute>\n </Component>\n\n</SystemConfiguration>"
返回值
常见的返回值已在此处记录,以下是此模块特有的字段
键 |
描述 |
---|---|
HTTP错误的详细信息。 返回:HTTP错误时 示例: |
|
iDRAC重置操作的状态。 返回:始终 示例: |
|
iDRAC重置操作的详细信息。 返回:触发重置操作时。 示例: |