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