Debian Codegraph @

ansible_collections/dellemc/openmanage/docs/modules/omevv_firmware.rst

raw
1 .. _omevv_firmware_module:
2
3
4 omevv_firmware -- Update the firmware of a specific host in the cluster
5 =======================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows you to update the firmware of a specific host in the cluster.
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 check_vSAN_health (optional, bool, None)
31 Check vSAN health while updating the firmware.
32
33 \ :literal:`true`\ checks the vSAN health while updating the firmware.
34
35 \ :literal:`false`\ does not check the vSAN health while updating the firmware.
36
37
38 date_time (optional, str, None)
39 Date and time when the job must run. This is applicable when \ :emphasis:`run\_now`\ is \ :literal:`false`\ .
40
41 The supported format is YYYY-MM-DDThh:mm:ss\<offset\>.
42
43
44 delete_job_queue (optional, bool, None)
45 Whether to delete the job queue in iDRAC while updating firmware.
46
47 \ :literal:`true`\ deletes the job queue in iDRAC while updating firmware.
48
49 \ :literal:`false`\ does not delete the job queue in iDRAC while updating firmware.
50
51
52 drs_check (optional, bool, False)
53 Allows you to check if DRS of the cluster is enabled or not.
54
55 \ :literal:`true`\ checks if Distributed Resource Scheduler (DRS) of the cluster is enabled.
56
57 \ :literal:`false`\ does not check if DRS of the cluster is enabled.
58
59
60 enter_maintenance_mode_options (optional, str, None)
61 VM migration policy during management mode.
62
63 \ :literal:`FULL\_DATA\_MIGRATION`\ for full data migration.
64
65 \ :literal:`ENSURE\_ACCESSIBILITY`\ for ensuring accessibility.
66
67 \ :literal:`NO\_DATA\_MIGRATION`\ does not migrate any data.
68
69
70 enter_maintenance_mode_timeout (optional, int, 60)
71 Time out value during maintenance mode in minutes.
72
73
74 evacuate_VMs (optional, bool, False)
75 Allows to move the virtual machine (VM) to other host when current host is powered off.
76
77 \ :literal:`true`\ moves the VM to another host when the current host is powered off.
78
79 \ :literal:`false`\ does not move the VM to another host when the current host is powered off.
80
81
82 exit_maintenance_mode (optional, bool, False)
83 Whether to exit management mode after Update.
84
85 \ :literal:`true`\ exits the management mode after Update.
86
87 \ :literal:`false`\ does not exit the management mode after Update.
88
89
90 job_description (optional, str, None)
91 Update job description.
92
93
94 job_name (optional, str, None)
95 Update job name.
96
97
98 job_wait (optional, bool, True)
99 Whether to wait till completion of the job. This is applicable when \ :emphasis:`power\_on`\ is \ :literal:`true`\ .
100
101 \ :literal:`true`\ waits for job completion.
102
103 \ :literal:`false`\ does not wait for job completion.
104
105
106 job_wait_timeout (optional, int, 1200)
107 The maximum wait time of \ :emphasis:`job\_wait`\ in seconds. The job is tracked only for this duration.
108
109 This option is applicable when \ :emphasis:`job\_wait`\ is \ :literal:`true`\ .
110
111
112 maintenance_mode_count_check (optional, bool, None)
113 Allows to check if any host in cluster is in management mode.
114
115 \ :literal:`true`\ checks if any host in cluster is in management mode.
116
117 \ :literal:`false`\ does not check if any host in cluster is in management mode.
118
119
120 reboot_options (optional, str, SAFEREBOOT)
121 Host reboot option for firmware update.
122
123 \ :literal:`FORCEREBOOT`\ will force reboot the server.
124
125 \ :literal:`SAFEREBOOT`\ reboots the server in safe mode.
126
127 \ :literal:`NEXTREBOOT`\ does not reboot the server.
128
129
130 reset_idrac (optional, bool, None)
131 Whether to reset the iDRAC while performing firmware update.
132
133 \ :literal:`true`\ resets the iDRAC while performing firmware update.
134
135 \ :literal:`false`\ does not reset the iDRAC while performing firmware update.
136
137
138 run_now (True, bool, None)
139 Whether to run the update job now or later.
140
141 \ :literal:`true`\ runs the update job instantly.
142
143 \ :literal:`false`\ runs the update at the specified \ :emphasis:`date\_time`\ .
144
145
146 targets (True, list, None)
147 The target details for the firmware update operation.
148
149 Either \ :emphasis:`cluster`\ , \ :emphasis:`servicetag`\ or \ :emphasis:`host`\ is required for the firmware update operation.
150
151
152 cluster (False, str, None)
153 Name of the cluster to which firmware needs to updated.
154
155 \ :emphasis:`cluster`\ is mutually exclusive with \ :emphasis:`servicetag`\ and \ :emphasis:`host`\ .
156
157 This module supports only single cluster update.
158
159
160 firmware_components (True, list, None)
161 List of host firmware components to update.
162
163 \ :ref:`dellemc.openmanage.omevv\_firmware\_compliance\_info <ansible_collections.dellemc.openmanage.omevv_firmware_compliance_info_module>`\ module can be used to fetch the supported firmware components.
164
165
166 host (optional, str, None)
167 The IP address or hostname of the host.
168
169 \ :emphasis:`host`\ is mutually exclusive with \ :emphasis:`servicetag`\ and \ :emphasis:`cluster`\ .
170
171 \ :ref:`dellemc.openmanage.omevv\_device\_info <ansible_collections.dellemc.openmanage.omevv_device_info_module>`\ module can be used to fetch the device information.
172
173
174 servicetag (optional, str, None)
175 The service tag of the host.
176
177 \ :emphasis:`servicetag`\ is mutually exclusive with \ :emphasis:`host`\ and \ :emphasis:`cluster`\ .
178
179 \ :ref:`dellemc.openmanage.omevv\_device\_info <ansible_collections.dellemc.openmanage.omevv_device_info_module>`\ module can be used to fetch the device information.
180
181
182
183 hostname (True, str, None)
184 IP address or hostname of the OpenManage Enterprise Modular.
185
186
187 vcenter_username (False, str, None)
188 Username for OpenManage Enterprise Integration for VMware vCenter (OMEVV).
189
190 If the username is not provided, then the environment variable \ :envvar:`OMEVV\_VCENTER\_USERNAME`\ is used.
191
192 Example: export OMEVV\_VCENTER\_USERNAME=username
193
194
195 vcenter_password (False, str, None)
196 Password for OpenManage Enterprise Integration for VMware vCenter (OMEVV).
197
198 If the password is not provided, then the environment variable \ :envvar:`OMEVV\_VCENTER\_PASSWORD`\ is used.
199
200 Example: export OMEVV\_VCENTER\_PASSWORD=password
201
202
203 vcenter_uuid (False, str, None)
204 Universally Unique Identifier (UUID) of vCenter.
205
206 vCenter UUID details can be retrieved using \ :ref:`dellemc.openmanage.omevv\_vcenter\_info <ansible_collections.dellemc.openmanage.omevv_vcenter_info_module>`\ module.
207
208 If UUID is not provided, then the environment variable \ :envvar:`OMEVV\_VCENTER\_UUID`\ is used.
209
210 Example: export OMEVV\_VCENTER\_UUID=uuid
211
212
213 port (optional, int, 443)
214 OpenManage Enterprise HTTPS port.
215
216
217 validate_certs (optional, bool, True)
218 Whether to check SSL certificate. - If \ :literal:`true`\ , the SSL certificates will be validated. - If \ :literal:`false`\ , the SSL certificates will not be validated.
219
220
221 ca_path (optional, path, None)
222 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
223
224
225 timeout (optional, int, 30)
226 The socket level timeout in seconds.
227
228
229
230
231
232 Notes
233 -----
234
235 .. note::
236 - Run this module from a system that has direct access to Dell OpenManage Enterprise.
237 - This module supports IPv4 and IPv6 addresses.
238
239
240
241
242 Examples
243 --------
244
245 .. code-block:: yaml+jinja
246
247
248 ---
249 - name: Immediately update the firmware of a single component for a specific host
250 dellemc.openmanage.omevv.omevv_firmware:
251 hostname: "XXX.XXX.XXX.XX"
252 vcenter_uuid: "xxxxx"
253 vcenter_username: "username"
254 vcenter_password: "password"
255 ca_path: "path/to/ca_file"
256 run_now: false
257 date_time: "2024-09-10T20:50:00Z"
258 enter_maintenance_mode_timeout: 60
259 enter_maintenance_mode_options: FULL_DATA_MIGRATION
260 drs_check: true
261 evacuate_VMs: true
262 exit_maintenance_mode: true
263 reboot_options: NEXTREBOOT
264 maintenance_mode_count_check: true
265 check_vSAN_health: true
266 reset_idrac: true
267 delete_job_queue: true
268 targets:
269 - servicetag: SVCTAG1
270 firmware_components:
271 - "DCIM:INSTALLED#802__Diagnostics.Embedded.1:LC.Embedded.1"
272
273 - name: Update the firmware of multiple components at scheduled time for a specific host
274 dellemc.openmanage.omevv.omevv_firmware:
275 hostname: "XXX.XXX.XXX.XY"
276 vcenter_uuid: "xxxxx"
277 vcenter_username: "username"
278 vcenter_password: "password"
279 ca_path: "path/to/ca_file"
280 run_now: false
281 date_time: "2024-09-10T20:50:00+05:30"
282 enter_maintenance_mode_timeout: 60
283 enter_maintenance_mode_options: ENSURE_ACCESSIBILITY
284 drs_check: true
285 evacuate_VMs: true
286 exit_maintenance_mode: true
287 reboot_options: FORCEREBOOT
288 maintenance_mode_count_check: true
289 check_vSAN_health: true
290 reset_idrac: false
291 delete_job_queue: false
292 targets:
293 - host: "XXX.XXX.XXX.XZ"
294 firmware_components:
295 - "DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo"
296 - "DCIM:INSTALLED#301_C_BOSS.SL.14-1"
297 - "DCIM:INSTALLED#807__TPM.Integrated.1-1"
298
299 - name: Update the firmware of multiple components at scheduled time for a cluster
300 dellemc.openmanage.omevv.omevv_firmware:
301 hostname: "XXX.XXX.XXX.XX"
302 vcenter_uuid: "xxxxx"
303 vcenter_username: "username"
304 vcenter_password: "password"
305 ca_path: "path/to/ca_file"
306 run_now: false
307 date_time: "2024-09-10T20:50:00+05:30"
308 enter_maintenance_mode_timeout: 60
309 enter_maintenance_mode_options: ENSURE_ACCESSIBILITY
310 drs_check: true
311 evacuate_VMs: true
312 exit_maintenance_mode: true
313 reboot_options: SAFEREBOOT
314 maintenance_mode_count_check: true
315 check_vSAN_health: true
316 reset_idrac: false
317 delete_job_queue: false
318 targets:
319 - cluster: cluster_a
320 firmware_components:
321 - "DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo"
322 - "DCIM:INSTALLED#301_C_BOSS.SL.14-1"
323 - "DCIM:INSTALLED#807__TPM.Integrated.1-1"
324
325 - name: Retrieve firmware compliance report of all hosts in the specific cluster
326 dellemc.openmanage.omevv_firmware_compliance_info:
327 hostname: "XXX.XXX.XXX.XX"
328 vcenter_uuid: "xxxxx"
329 vcenter_username: "username"
330 vcenter_password: "password"
331 ca_path: "path/to/ca_file"
332 clusters:
333 - cluster_name: cluster_a
334 register: compliance_data
335
336 - name: Initialize compliance status results
337 ansible.builtin.set_fact:
338 source_names: []
339 service_tag: ""
340
341 - name: Flatten host compliance reports
342 ansible.builtin.set_fact:
343 host_reports: "{{
344 compliance_data.firmware_compliance_info |
345 map(attribute='hostComplianceReports') |
346 flatten(levels=1) }}"
347
348 - name: Flatten and filter concompliant components
349 ansible.builtin.set_fact:
350 non_compliant_components: >-
351 {{
352 host_reports
353 | map(attribute='componentCompliances')
354 | flatten(levels=1)
355 | selectattr('driftStatus', 'equalto', 'NonCompliant')
356 }}
357
358 - name: Gather components source name and set service tag
359 ansible.builtin.set_fact:
360 source_names: "{{ source_names + [item.sourceName] }}"
361 service_tag: "{{ host_report.serviceTag }}"
362 loop: "{{ non_compliant_components }}"
363 vars:
364 host_report: >-
365 {{
366 host_reports
367 | selectattr('componentCompliances', 'contains', item)
368 | first
369 }}
370
371 - name: Combine the final non compliance report
372 ansible.builtin.set_fact:
373 noncompliance_report:
374 sourceNames: "{{ source_names }}"
375 serviceTag: "{{ service_tag }}"
376
377 - name: Update firmware at the scheduled time for a specific host
378 dellemc.openmanage.omevv.omevv_firmware:
379 hostname: "192.168.0.1"
380 vcenter_uuid: "{{ vcenter_uuid }}"
381 vcenter_username: "username"
382 vcenter_password: "password"
383 ca_path: "path/to/ca_file"
384 run_now: false
385 date_time: "2024-09-10T20:50:00Z"
386 enter_maintenance_mode_timeout: 60
387 enter_maintenance_mode_options: NO_DATA_MIGRATION
388 drs_check: true
389 evacuate_VMs: false
390 exit_maintenance_mode: true
391 reboot_options: SAFEREBOOT
392 maintenance_mode_count_check: true
393 check_vSAN_health: true
394 reset_idrac: true
395 delete_job_queue: true
396 targets:
397 - servicetag: "{{ noncompliance_report.serviceTag }}"
398 firmware_components: "{{ noncompliance_report.sourceNames }}"
399
400
401
402 Return Values
403 -------------
404
405 msg (always, str, Successfully created the OMEVV baseline profile.)
406 Status of the firmware update operation.
407
408
409 error_info (on HTTP error, dict, {'errorCode': '20058', 'message': 'Update Job already running for group id 1004 corresponding to cluster OMAM-Cluster-1. Wait for its completion and trigger.'})
410 Details of the module HTTP Error.
411
412
413
414
415
416 Status
417 ------
418
419
420
421
422
423 Authors
424 ~~~~~~~
425
426 - Rajshekar P(@rajshekarp87)
427