Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_boot/README.md

raw symbols SCIP
1 # idrac_boot
2
3 Role to configure the boot order settings
4
5 ## Requirements
6
7 ### Development
8 Requirements to develop and contribute to the role
9 ```
10 ansible
11 docker
12 molecule
13 python
14 ```
15
16 ### Production
17 Requirements to use the role
18 ```
19 ansible
20 python
21 ```
22
23 ### Ansible collections
24 Collections required to use the role
25 ```
26 dellemc.openmanage
27 ```
28
29 ## Role Variables
30
31 <table>
32 <thead>
33 <tr>
34 <th>Name</th>
35 <th>Required</th>
36 <th>Default Value</th>
37 <th>Choices</th>
38 <th>Type</th>
39 <th>Description</th>
40 </tr>
41 </thead>
42 <tbody>
43 <tr>
44 <td>hostname</td>
45 <td>true</td>
46 <td></td>
47 <td></td>
48 <td>str</td>
49 <td>- iDRAC IP Address</td>
50 </tr>
51 <tr>
52 <td>username</td>
53 <td>true</td>
54 <td></td>
55 <td></td>
56 <td>str</td>
57 <td>- iDRAC username</td>
58 </tr>
59 <tr>
60 <td>password</td>
61 <td>true</td>
62 <td></td>
63 <td></td>
64 <td>str</td>
65 <td>- iDRAC user password</td>
66 </tr>
67 <tr>
68 <td>https_port</td>
69 <td>false</td>
70 <td>443</td>
71 <td></td>
72 <td>int</td>
73 <td>- iDRAC port.</td>
74 </tr>
75 <tr>
76 <td>validate_certs</td>
77 <td>false</td>
78 <td>true</td>
79 <td></td>
80 <td>bool</td>
81 <td>- If C(false), the SSL certificates will not be validated.<br>- Configure C(false) only on personally controlled sites where self-signed certificates are used.</td>
82 </tr>
83 <tr>
84 <td>ca_path</td>
85 <td>false</td>
86 <td></td>
87 <td></td>
88 <td>path</td>
89 <td>- The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.</td>
90 </tr>
91 <tr>
92 <td>https_timeout</td>
93 <td>false</td>
94 <td>30</td>
95 <td></td>
96 <td>int</td>
97 <td>- The HTTPS socket level timeout in seconds.</td>
98 </tr>
99 <tr>
100 <td>boot_options</td>
101 <td>false</td>
102 <td></td>
103 <td></td>
104 <td>list</td>
105 <td>- Options to enable or disable the boot devices.<br>- This is mutually exclusive with I(boot_order), I(boot_source_override_mode), I(boot_source_override_enabled), I(boot_source_override_target), and I(uefi_target_boot_source_override).</td>
106 </tr>
107 <tr>
108 <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boot_option_reference</td>
109 <td>false</td>
110 <td></td>
111 <td></td>
112 <td>str</td>
113 <td>- FQDD of the boot device.<br>- This is mutually exclusive with I(display_name).</td>
114 </tr>
115 <tr>
116 <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display_name</td>
117 <td>false</td>
118 <td></td>
119 <td></td>
120 <td>str</td>
121 <td>- Display name of the boot source device.<br>- This is mutually exclusive with I(boot_option_reference).</td>
122 </tr>
123 <tr>
124 <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled</td>
125 <td>true</td>
126 <td></td>
127 <td></td>
128 <td>bool</td>
129 <td>- Enable or disable the boot device.</td>
130 </tr>
131 <tr>
132 <td>boot_order</td>
133 <td>false</td>
134 <td></td>
135 <td></td>
136 <td>list</td>
137 <td>- This option allows to set the boot devices in the required boot order sequence.<br>- This is mutually exclusive with I(boot_options).</td>
138 </tr>
139 <tr>
140 <td>boot_source_override_mode</td>
141 <td>false</td>
142 <td></td>
143 <td>'legacy', 'uefi'</td>
144 <td>str</td>
145 <td>- The BIOS boot mode (either Legacy or UEFI) to be used when I(boot_source_override_target) boot source is booted.<br>- C(legacy) The system boot in non-UEFI(Legacy) boot mode to the I(boot_source_override_target).<br>- C(uefi) The system boot in UEFI boot mode to the I(boot_source_override_target).<br>- This is read-only property for iDRAC 17G and later.<br>- This is mutually exclusive with I(boot_options).</td>
146 </tr>
147 <tr>
148 <td>boot_source_override_enabled</td>
149 <td>false</td>
150 <td></td>
151 <td>'continuous', 'disabled', 'once'</td>
152 <td>str</td>
153 <td>- The state of the Boot Source Override feature.<br>- C(disabled), the system boots normally.<br>- C(once), the system boots 1 time to the I(boot_source_override_target).<br>- C(continuous), the system boots to the target specified in the I(boot_source_override_target) until this property is set to Disabled.<br>- The state is set to C(once) for the 1 time boot override and C(continuous) for the remain-active-until—cancelled override. If the state is set C(once) or C(continuous), the value is reset to C(disabled) after the I(boot_source_override_target) actions have completed successfully.<br>- Changes to these options do not alter the BIOS persistent boot order configuration.<br>- This is mutually exclusive with I(boot_options).</td>
154 </tr>
155 <tr>
156 <td>boot_source_override_target</td>
157 <td>false</td>
158 <td></td>
159 <td>'uefi_http', 'sd_card', 'uefi_target', 'utilities', 'bios_setup', 'hdd', 'cd', 'floppy', 'pxe', 'none'</td>
160 <td>str</td>
161 <td>- The boot source override targets the device to use during the next boot instead of the normal boot device.<br>- C(pxe) performs PXE boot from the primary NIC.<br>- C(floppy), C(cd), C(hdd), and C(sd_card) performs boot from their devices respectively.<br>- C(bios_setup) performs boot into the native BIOS setup.<br>- C(uefi_http) performs boot from a URI over HTTP.<br>- C(utilities) performs boot from the local utilities.<br>- C(uefi_target) performs boot from the UEFI device path found in I(uefi_target_boot_source_override).<br>- C(none) if the I(boot_source_override_target) is set to a value other than C(none) then the I(boot_source_override_enabled) is automatically set to C(once) if I(boot_source_override_enabled) is not provided.<br>- Changes to these options do not alter the BIOS persistent boot order configuration.<br>- This is required if I(boot_source_override_enabled) is C(once) or C(continuous) for iDRAC 17G and later.<br>- This is mutually exclusive with I(boot_options).</td>
162 </tr>
163 <tr>
164 <td>uefi_target_boot_source_override</td>
165 <td>false</td>
166 <td></td>
167 <td></td>
168 <td>str</td>
169 <td>- The UEFI device path of the device from which to boot when I(boot_source_override_target) is C(uefi_target).<br>- If I(boot_source_override_target) is set to C(uefi_target), then I(boot_source_override_enabled) cannot be set to c(continuous) because this setting is defined in UEFI as a one-time-boot setting.<br>- Changes to these options do not alter the BIOS persistent boot order configuration.<br>- This is required if I(boot_source_override_target) is C(uefi_target).<br>- This is mutually exclusive with I(boot_options).</td>
170 </tr>
171 <tr>
172 <td>reset_type</td>
173 <td>false</td>
174 <td>graceful_restart</td>
175 <td>'graceful_restart', 'force_restart', 'none'</td>
176 <td>str</td>
177 <td>- C(none) Host system is not rebooted and I(job_wait) is not applicable.<br>- C(force_restart) Forcefully reboot the Host system.<br>- C(graceful_restart) Gracefully reboot the Host system.</td>
178 </tr>
179 <tr>
180 <td>job_wait</td>
181 <td>false</td>
182 <td>true</td>
183 <td></td>
184 <td>bool</td>
185 <td>- Provides the option to wait for job completion.<br>- This is applicable when I(reset_type) is C(force_reset) or C(graceful_reset).</td>
186 </tr>
187 <tr>
188 <td>job_wait_timeout</td>
189 <td>false</td>
190 <td>900</td>
191 <td></td>
192 <td>int</td>
193 <td>- The maximum wait time of I(job_wait) in seconds. The job is tracked only for this duration.<br>- This option is applicable when I(job_wait) is C(True).</td>
194 </tr>
195 <tr>
196 <td>resource_id</td>
197 <td>false</td>
198 <td></td>
199 <td></td>
200 <td>str</td>
201 <td>- Redfish ID of the resource.</td>
202 </tr>
203 </tbody>
204 </table>
205
206 ## Fact variables
207
208 <table>
209 <thead>
210 <tr>
211 <th>Name</th>
212 <th>Sample</th>
213 <th>Description</th>
214 </tr>
215 </thead>
216 <tbody>
217 <tr>
218 <td>idrac_boot_out</td>
219 <td>{
220 "boot": {
221 "BootOptions": {
222 "Description": "Collection of BootOptions",
223 "Members": [
224 {
225 "BootOptionEnabled": true,
226 "BootOptionReference": "Boot0005",
227 "Description": "Current settings of the UEFI Boot option",
228 "DisplayName": "Integrated RAID Controller 1: VMware ESXi",
229 "Id": "Boot0005",
230 "Name": "Uefi Boot Option",
231 "UefiDevicePath": "HD(1,GPT,740C46A9-4A43-47AA-9C09-65E821376E48,0x40,0x32000)/\\EFI\\VMware\\safeboot64.efi"
232 },
233 {
234 "BootOptionEnabled": false,
235 "BootOptionReference": "Boot0004",
236 "Description": "Current settings of the UEFI Boot option",
237 "DisplayName": "Unavailable: Windows Boot Manager",
238 "Id": "Boot0004",
239 "Name": "Uefi Boot Option",
240 "UefiDevicePath": "HD(1,GPT,AEB2A96B-5C31-4F8F-9927-B48B08D907BE,0x800,0xF9800)/\\EFI\\Microsoft\\Boot\\bootmgfw.efi"
241 },
242 {
243 "BootOptionEnabled": true,
244 "BootOptionReference": "Boot0006",
245 "Description": "Current settings of the UEFI Boot option",
246 "DisplayName": "Unavailable: Red Hat Enterprise Linux",
247 "Id": "Boot0006",
248 "Name": "Uefi Boot Option",
249 "UefiDevicePath": "HD(1,GPT,14759088-1AE7-4EA4-A60B-BE82546E21B6,0x800,0x12C000)/\\EFI\\redhat\\shimx64.efi"
250 },
251 {
252 "BootOptionEnabled": true,
253 "BootOptionReference": "Boot0003",
254 "Description": "Current settings of the UEFI Boot option",
255 "DisplayName": "Unavailable: Rocky Linux",
256 "Id": "Boot0003",
257 "Name": "Uefi Boot Option",
258 "UefiDevicePath": "HD(1,GPT,ADC59C44-A0D3-4917-9376-33EE44DE96F0,0x800,0x12C000)/\\EFI\\rocky\\shimx64.efi"
259 }
260 ],
261 "Name": "Boot Options Collection"
262 },
263 "BootOrder": [
264 "Boot0005",
265 "Boot0004",
266 "Boot0006",
267 "Boot0003"
268 ],
269 "BootSourceOverrideEnabled": "Disabled",
270 "BootSourceOverrideMode": "UEFI",
271 "BootSourceOverrideTarget": "None",
272 "UefiTargetBootSourceOverride": null
273 },
274 "job": {
275 "ActualRunningStartTime": "2023-06-19T09:48:41",
276 "ActualRunningStopTime": "2023-06-19T09:51:53",
277 "CompletionTime": "2023-06-19T09:51:53",
278 "Description": "Job Instance",
279 "EndTime": "TIME_NA",
280 "Id": "JID_871679370016",
281 "JobState": "Completed",
282 "JobType": "BIOSConfiguration",
283 "Message": "Job completed successfully.",
284 "MessageArgs": [],
285 "MessageId": "PR19",
286 "Name": "Configure: BIOS.Setup.1-1",
287 "PercentComplete": 100,
288 "StartTime": "2023-06-19T09:45:36",
289 "TargetSettingsURI": null
290 },
291 "msg": "Successfully updated the boot settings."
292 }</td>
293 <td>Role output of the idrac_boot job.</td>
294 </tr>
295 </tbody>
296 </table>
297
298 ## Example Playbook
299
300 ```
301 - name: Configure the system boot options settings.
302 ansible.builtin.include_role:
303 name: dellemc.openmanage.idrac_boot
304 vars:
305 hostname: "192.168.0.1"
306 username: "user_name"
307 password: "user_password"
308 boot_options:
309 - display_name: Hard drive C
310 enabled: true
311 - boot_option_reference: NIC.PxeDevice.2-1
312 enabled: true
313 ```
314
315 ```
316 - name: Configure the boot order settings.
317 ansible.builtin.include_role:
318 name: dellemc.openmanage.idrac_boot
319 vars:
320 hostname: "192.168.0.1"
321 username: "user_name"
322 password: "user_password"
323 boot_order:
324 - Boot0001
325 - Boot0002
326 - Boot0004
327 - Boot0003
328 ```
329
330 ```
331 - name: Configure the boot source override mode.
332 ansible.builtin.include_role:
333 name: dellemc.openmanage.idrac_boot
334 vars:
335 hostname: "192.168.0.1"
336 username: "user_name"
337 password: "user_password"
338 boot_source_override_mode: legacy
339 boot_source_override_target: cd
340 boot_source_override_enabled: once
341 ```
342
343 ```
344 - name: Configure the UEFI target settings.
345 ansible.builtin.include_role:
346 name: dellemc.openmanage.idrac_boot
347 vars:
348 hostname: "192.168.0.1"
349 username: "user_name"
350 password: "user_password"
351 boot_source_override_mode: uefi
352 boot_source_override_target: uefi_target
353 uefi_target_boot_source_override: "VenHw(3A191845-5F86-4E78-8FCE-C4CFF59F9DAA)"
354 ```
355
356 ```
357 - name: Configure the boot source override mode as pxe.
358 ansible.builtin.include_role:
359 name: dellemc.openmanage.idrac_boot
360 vars:
361 hostname: "192.168.0.1"
362 username: "user_name"
363 password: "user_password"
364 boot_source_override_mode: legacy
365 boot_source_override_target: pxe
366 boot_source_override_enabled: continuous
367 ```
368
369 Author Information
370 ------------------
371
372 Dell Technologies <br>
373 Felix Stephen ([email protected]) 2023