| 1 |
.. _idrac_reset_module: |
| 2 |
|
| 3 |
|
| 4 |
idrac_reset -- Factory reset the iDRACs |
| 5 |
======================================= |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module resets the iDRAC to factory default settings. |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
Requirements |
| 20 |
------------ |
| 21 |
The below requirements are needed on the host that executes this module. |
| 22 |
|
| 23 |
- python \>= 3.9.6 |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
Parameters |
| 28 |
---------- |
| 29 |
|
| 30 |
reset_to_default (optional, str, None) |
| 31 |
If this value is not set the default behaviour is to restart the iDRAC. |
| 32 |
|
| 33 |
\ :literal:`All`\ Discards all settings and reset to default credentials. |
| 34 |
|
| 35 |
\ :literal:`ResetAllWithRootDefaults`\ Discards all settings and reset the default username to root and password to the shipping value. |
| 36 |
|
| 37 |
\ :literal:`Default`\ Discards all settings, but preserves user and network settings. |
| 38 |
|
| 39 |
\ :literal:`CustomDefaults`\ All configuration is set to custom defaults.This option is supported on firmware version 7.00.00.00 and newer versions. |
| 40 |
|
| 41 |
|
| 42 |
custom_defaults_file (optional, str, None) |
| 43 |
Name of the custom default configuration file in the XML format. |
| 44 |
|
| 45 |
This option is applicable when \ :emphasis:`reset\_to\_default`\ is \ :literal:`CustomDefaults`\ . |
| 46 |
|
| 47 |
\ :emphasis:`custom\_defaults\_file`\ is mutually exclusive with \ :emphasis:`custom\_defaults\_buffer`\ . |
| 48 |
|
| 49 |
|
| 50 |
custom_defaults_buffer (optional, str, None) |
| 51 |
This parameter provides the option to import the buffer input in XML format as a custom default configuration. |
| 52 |
|
| 53 |
This option is applicable when \ :emphasis:`reset\_to\_default`\ is \ :literal:`CustomDefaults`\ . |
| 54 |
|
| 55 |
\ :emphasis:`custom\_defaults\_buffer`\ is mutually exclusive with \ :emphasis:`custom\_defaults\_file`\ . |
| 56 |
|
| 57 |
|
| 58 |
wait_for_idrac (optional, bool, True) |
| 59 |
This parameter provides the option to wait for the iDRAC to reset and lifecycle controller status to be ready. |
| 60 |
|
| 61 |
|
| 62 |
job_wait_timeout (optional, int, 600) |
| 63 |
Time in seconds to wait for job completion. |
| 64 |
|
| 65 |
This is applicable when \ :emphasis:`wait\_for\_idrac`\ is \ :literal:`true`\ . |
| 66 |
|
| 67 |
|
| 68 |
force_reset (optional, bool, False) |
| 69 |
This parameter provides the option to force reset the iDRAC without checking the iDRAC lifecycle controller status. |
| 70 |
|
| 71 |
This option is applicable only for iDRAC9. |
| 72 |
|
| 73 |
|
| 74 |
default_username (optional, str, None) |
| 75 |
This parameter is only applied when \ :emphasis:`reset\_to\_default`\ is \ :literal:`All`\ or \ :literal:`ResetAllWithRootDefaults`\ . |
| 76 |
|
| 77 |
This parameter is required to track LifeCycle status of the server after the reset operation is performed. If this parameter is not provided, then the LifeCycle status is not tracked after the reset operation. |
| 78 |
|
| 79 |
|
| 80 |
default_password (optional, str, None) |
| 81 |
This parameter is only applied when \ :emphasis:`reset\_to\_default`\ is \ :literal:`All`\ or \ :literal:`ResetAllWithRootDefaults`\ . |
| 82 |
|
| 83 |
This parameter is required to track LifeCycle status of the server after the reset operation is performed. If this parameter is not provided, then the LifeCycle status is not tracked after the reset operation. |
| 84 |
|
| 85 |
|
| 86 |
idrac_ip (True, str, None) |
| 87 |
iDRAC IP Address. |
| 88 |
|
| 89 |
|
| 90 |
idrac_user (False, str, None) |
| 91 |
iDRAC username. |
| 92 |
|
| 93 |
If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used. |
| 94 |
|
| 95 |
Example: export IDRAC\_USERNAME=username |
| 96 |
|
| 97 |
|
| 98 |
idrac_password (False, str, None) |
| 99 |
iDRAC user password. |
| 100 |
|
| 101 |
If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used. |
| 102 |
|
| 103 |
Example: export IDRAC\_PASSWORD=password |
| 104 |
|
| 105 |
|
| 106 |
x_auth_token (False, str, None) |
| 107 |
Authentication token. |
| 108 |
|
| 109 |
If the x\_auth\_token is not provided, then the environment variable \ :envvar:`IDRAC\_X\_AUTH\_TOKEN`\ is used. |
| 110 |
|
| 111 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 112 |
|
| 113 |
|
| 114 |
idrac_port (optional, int, 443) |
| 115 |
iDRAC port. |
| 116 |
|
| 117 |
|
| 118 |
validate_certs (optional, bool, True) |
| 119 |
If \ :literal:`false`\ , the SSL certificates will not be validated. |
| 120 |
|
| 121 |
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used. |
| 122 |
|
| 123 |
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default. |
| 124 |
|
| 125 |
|
| 126 |
ca_path (optional, path, None) |
| 127 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 128 |
|
| 129 |
|
| 130 |
timeout (optional, int, 30) |
| 131 |
The socket level timeout in seconds. |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
Notes |
| 138 |
----- |
| 139 |
|
| 140 |
.. note:: |
| 141 |
- Run this module from a system that has direct access to Dell iDRAC. |
| 142 |
- This module supports both IPv4 and IPv6 address for \ :emphasis:`idrac\_ip`\ . |
| 143 |
- This module supports \ :literal:`check\_mode`\ . |
| 144 |
- If reset\_to\_default option is not specified, then this module triggers a graceful restart. |
| 145 |
- This module skips the execution if reset options are not supported by the iDRAC. |
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
Examples |
| 151 |
-------- |
| 152 |
|
| 153 |
.. code-block:: yaml+jinja |
| 154 |
|
| 155 |
|
| 156 |
--- |
| 157 |
- name: Reset the iDRAC to default and do not wait till the iDRAC is accessible. |
| 158 |
dellemc.openmanage.idrac_reset: |
| 159 |
idrac_ip: "192.168.0.1" |
| 160 |
idrac_user: "user_name" |
| 161 |
idrac_password: "user_password" |
| 162 |
ca_path: "/path/to/ca_cert.pem" |
| 163 |
reset_to_default: "Default" |
| 164 |
wait_for_idrac: false |
| 165 |
|
| 166 |
- name: Reset the iDRAC to All and wait for lifecycle controller status to be ready. |
| 167 |
dellemc.openmanage.idrac_reset: |
| 168 |
idrac_ip: "192.168.0.1" |
| 169 |
idrac_user: "user_name" |
| 170 |
idrac_password: "user_password" |
| 171 |
ca_path: "/path/to/ca_cert.pem" |
| 172 |
reset_to_default: "All" |
| 173 |
wait_for_idrac: true |
| 174 |
default_username: "user_name" |
| 175 |
default_password: "user_password" |
| 176 |
|
| 177 |
- name: Force reset the iDRAC to default. |
| 178 |
dellemc.openmanage.idrac_reset: |
| 179 |
idrac_ip: "192.168.0.1" |
| 180 |
idrac_user: "user_name" |
| 181 |
idrac_password: "user_password" |
| 182 |
ca_path: "/path/to/ca_cert.pem" |
| 183 |
reset_to_default: "Default" |
| 184 |
force_reset: true |
| 185 |
|
| 186 |
- name: Gracefully restart the iDRAC. |
| 187 |
dellemc.openmanage.idrac_reset: |
| 188 |
idrac_ip: "192.168.0.1" |
| 189 |
idrac_user: "user_name" |
| 190 |
idrac_password: "user_password" |
| 191 |
ca_path: "/path/to/ca_cert.pem" |
| 192 |
|
| 193 |
- name: Reset the iDRAC to custom defaults XML and do not wait till the iDRAC is accessible. |
| 194 |
dellemc.openmanage.idrac_reset: |
| 195 |
idrac_ip: "192.168.0.1" |
| 196 |
idrac_user: "user_name" |
| 197 |
idrac_password: "user_password" |
| 198 |
ca_path: "/path/to/ca_cert.pem" |
| 199 |
reset_to_default: "CustomDefaults" |
| 200 |
custom_defaults_file: "/path/to/custom_defaults.xml" |
| 201 |
|
| 202 |
- name: Reset the iDRAC to custom defaults buffer input and do not wait till the iDRAC is accessible. |
| 203 |
dellemc.openmanage.idrac_reset: |
| 204 |
idrac_ip: "192.168.0.1" |
| 205 |
idrac_user: "user_name" |
| 206 |
idrac_password: "user_password" |
| 207 |
ca_path: "/path/to/ca_cert.pem" |
| 208 |
reset_to_default: "CustomDefaults" |
| 209 |
custom_defaults_buffer: "<SystemConfiguration Model=\"PowerEdge R7525\" ServiceTag=\"ABCD123\">\n<Component FQDD=\"iDRAC.Embedded.1\">\n |
| 210 |
<Attribute Name=\"IPMILan.1#Enable\">Disabled</Attribute>\n </Component>\n\n</SystemConfiguration>" |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
Return Values |
| 215 |
------------- |
| 216 |
|
| 217 |
msg (always, str, Successfully performed iDRAC reset.) |
| 218 |
Status of the iDRAC reset operation. |
| 219 |
|
| 220 |
|
| 221 |
reset_status (reset operation is triggered., dict, {'idracreset': {'Data': {'StatusCode': 204}, 'Message': 'none', 'Status': 'Success', 'StatusCode': 204, 'retval': True}}) |
| 222 |
Details of iDRAC reset operation. |
| 223 |
|
| 224 |
|
| 225 |
error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}}) |
| 226 |
Details of the HTTP Error. |
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
Status |
| 233 |
------ |
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
Authors |
| 240 |
~~~~~~~ |
| 241 |
|
| 242 |
- Felix Stephen (@felixs88) |
| 243 |
- Anooja Vardhineni (@anooja-vardhineni) |
| 244 |
- Lovepreet Singh (@singh-lovepreet1) |
| 245 |
- Abhishek Sinha (@ABHISHEK-SINHA10) |
| 246 |
|