| 1 |
.. _idrac_virtual_media_module: |
| 2 |
|
| 3 |
|
| 4 |
idrac_virtual_media -- Configure the Remote File Share settings. |
| 5 |
================================================================ |
| 6 |
|
| 7 |
.. contents:: |
| 8 |
:local: |
| 9 |
:depth: 1 |
| 10 |
|
| 11 |
|
| 12 |
Synopsis |
| 13 |
-------- |
| 14 |
|
| 15 |
This module allows to configure Remote File Share 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 |
virtual_media (True, list, None) |
| 31 |
Details of the Remote File Share. |
| 32 |
|
| 33 |
|
| 34 |
insert (True, bool, None) |
| 35 |
\ :literal:`true`\ connects the remote image file. |
| 36 |
|
| 37 |
\ :literal:`false`\ ejects the remote image file if connected. |
| 38 |
|
| 39 |
|
| 40 |
image (optional, path, None) |
| 41 |
The path of the image file. The supported file types are .img and .iso. |
| 42 |
|
| 43 |
The file name with .img extension is redirected as a virtual floppy and a file name with .iso extension is redirected as a virtual CDROM. |
| 44 |
|
| 45 |
This option is required when \ :emphasis:`insert`\ is \ :literal:`true`\ . |
| 46 |
|
| 47 |
The following are the examples of the share location: CIFS share: //192.168.0.1/file\_path/image\_name.iso, NFS share: 192.168.0.2:/file\_path/image\_name.img, HTTP share: http://192.168.0.3/file\_path/image\_name.iso, HTTPS share: https://192.168.0.4/file\_path/image\_name.img |
| 48 |
|
| 49 |
CIFS share is not supported by iDRAC8. |
| 50 |
|
| 51 |
HTTPS share with credentials is not supported by iDRAC8. |
| 52 |
|
| 53 |
|
| 54 |
index (optional, int, None) |
| 55 |
Index of the Remote File Share. For example, to specify the Remote File Share 1, the value of \ :emphasis:`index`\ should be 1. If \ :emphasis:`index`\ is not specified, the order of \ :emphasis:`virtual\_media`\ list will be considered. |
| 56 |
|
| 57 |
|
| 58 |
domain (optional, str, None) |
| 59 |
Domain name of network share. This option is applicable for CIFS and HTTPS share. |
| 60 |
|
| 61 |
|
| 62 |
username (optional, str, None) |
| 63 |
Network share username. This option is applicable for CIFS and HTTPS share. |
| 64 |
|
| 65 |
|
| 66 |
password (optional, str, None) |
| 67 |
Network share password. This option is applicable for CIFS and HTTPS share. |
| 68 |
|
| 69 |
This module always reports as the changes found when \ :emphasis:`password`\ is provided. |
| 70 |
|
| 71 |
|
| 72 |
media_type (optional, str, None) |
| 73 |
Type of the image file. This is applicable when \ :emphasis:`insert`\ is \ :literal:`true`\ . |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
force (optional, bool, False) |
| 78 |
\ :literal:`true`\ ejects the image file if already connected and inserts the file provided in \ :emphasis:`image`\ . This is applicable when \ :emphasis:`insert`\ is \ :literal:`true`\ . |
| 79 |
|
| 80 |
|
| 81 |
resource_id (optional, str, None) |
| 82 |
Resource id of the iDRAC, if not specified manager collection id will be used. |
| 83 |
|
| 84 |
|
| 85 |
idrac_ip (True, str, None) |
| 86 |
iDRAC IP Address. |
| 87 |
|
| 88 |
|
| 89 |
idrac_user (False, str, None) |
| 90 |
iDRAC username. |
| 91 |
|
| 92 |
If the username is not provided, then the environment variable \ :envvar:`IDRAC\_USERNAME`\ is used. |
| 93 |
|
| 94 |
Example: export IDRAC\_USERNAME=username |
| 95 |
|
| 96 |
|
| 97 |
idrac_password (False, str, None) |
| 98 |
iDRAC user password. |
| 99 |
|
| 100 |
If the password is not provided, then the environment variable \ :envvar:`IDRAC\_PASSWORD`\ is used. |
| 101 |
|
| 102 |
Example: export IDRAC\_PASSWORD=password |
| 103 |
|
| 104 |
|
| 105 |
x_auth_token (False, str, None) |
| 106 |
Authentication token. |
| 107 |
|
| 108 |
If the x\_auth\_token is not provided, then the environment variable \ :envvar:`IDRAC\_X\_AUTH\_TOKEN`\ is used. |
| 109 |
|
| 110 |
Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token |
| 111 |
|
| 112 |
|
| 113 |
idrac_port (optional, int, 443) |
| 114 |
iDRAC port. |
| 115 |
|
| 116 |
|
| 117 |
validate_certs (optional, bool, True) |
| 118 |
If \ :literal:`false`\ , the SSL certificates will not be validated. |
| 119 |
|
| 120 |
Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used. |
| 121 |
|
| 122 |
Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default. |
| 123 |
|
| 124 |
|
| 125 |
ca_path (optional, path, None) |
| 126 |
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
| 127 |
|
| 128 |
|
| 129 |
timeout (optional, int, 30) |
| 130 |
The socket level timeout in seconds. |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
Notes |
| 137 |
----- |
| 138 |
|
| 139 |
.. note:: |
| 140 |
- Run this module from a system that has direct access to Dell iDRAC. |
| 141 |
- This module supports \ :literal:`check\_mode`\ . |
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
Examples |
| 147 |
-------- |
| 148 |
|
| 149 |
.. code-block:: yaml+jinja |
| 150 |
|
| 151 |
|
| 152 |
--- |
| 153 |
- name: Insert image file to Remote File Share 1 using CIFS share. |
| 154 |
dellemc.openmanage.idrac_virtual_media: |
| 155 |
idrac_ip: "192.168.0.1" |
| 156 |
idrac_user: "user_name" |
| 157 |
idrac_password: "user_password" |
| 158 |
ca_path: "/path/to/ca_cert.pem" |
| 159 |
virtual_media: |
| 160 |
- insert: true |
| 161 |
image: "//192.168.0.2/file_path/file.iso" |
| 162 |
username: "username" |
| 163 |
password: "password" |
| 164 |
|
| 165 |
- name: Insert image file to Remote File Share 2 using NFS share. |
| 166 |
dellemc.openmanage.idrac_virtual_media: |
| 167 |
idrac_ip: "192.168.0.1" |
| 168 |
idrac_user: "user_name" |
| 169 |
idrac_password: "user_password" |
| 170 |
ca_path: "/path/to/ca_cert.pem" |
| 171 |
virtual_media: |
| 172 |
- index: 2 |
| 173 |
insert: true |
| 174 |
image: "192.168.0.4:/file_path/file.iso" |
| 175 |
|
| 176 |
- name: Insert image file to Remote File Share 1 and 2 using HTTP. |
| 177 |
dellemc.openmanage.idrac_virtual_media: |
| 178 |
idrac_ip: "192.168.0.1" |
| 179 |
idrac_user: "user_name" |
| 180 |
idrac_password: "user_password" |
| 181 |
ca_path: "/path/to/ca_cert.pem" |
| 182 |
force: true |
| 183 |
virtual_media: |
| 184 |
- index: 1 |
| 185 |
insert: true |
| 186 |
image: "http://192.168.0.4/file_path/file.img" |
| 187 |
- index: 2 |
| 188 |
insert: true |
| 189 |
image: "http://192.168.0.4/file_path/file.img" |
| 190 |
|
| 191 |
- name: Insert image file using HTTPS. |
| 192 |
dellemc.openmanage.idrac_virtual_media: |
| 193 |
idrac_ip: "192.168.0.1" |
| 194 |
idrac_user: "user_name" |
| 195 |
idrac_password: "user_password" |
| 196 |
ca_path: "/path/to/ca_cert.pem" |
| 197 |
force: true |
| 198 |
virtual_media: |
| 199 |
- index: 1 |
| 200 |
insert: true |
| 201 |
image: "https://192.168.0.5/file_path/file.img" |
| 202 |
username: username |
| 203 |
password: password |
| 204 |
|
| 205 |
- name: Eject multiple virtual media. |
| 206 |
dellemc.openmanage.idrac_virtual_media: |
| 207 |
idrac_ip: "192.168.0.1" |
| 208 |
idrac_user: "user_name" |
| 209 |
idrac_password: "user_password" |
| 210 |
ca_path: "/path/to/ca_cert.pem" |
| 211 |
force: true |
| 212 |
virtual_media: |
| 213 |
- index: 1 |
| 214 |
insert: false |
| 215 |
- index: 2 |
| 216 |
insert: false |
| 217 |
|
| 218 |
- name: Ejection of image file from Remote File Share 1. |
| 219 |
dellemc.openmanage.idrac_virtual_media: |
| 220 |
idrac_ip: "192.168.0.1" |
| 221 |
idrac_user: "user_name" |
| 222 |
idrac_password: "user_password" |
| 223 |
ca_path: "/path/to/ca_cert.pem" |
| 224 |
force: true |
| 225 |
virtual_media: |
| 226 |
insert: false |
| 227 |
|
| 228 |
- name: Insertion and ejection of image file in single task. |
| 229 |
dellemc.openmanage.idrac_virtual_media: |
| 230 |
idrac_ip: "192.168.0.1" |
| 231 |
idrac_user: "user_name" |
| 232 |
idrac_password: "user_password" |
| 233 |
ca_path: "/path/to/ca_cert.pem" |
| 234 |
force: true |
| 235 |
virtual_media: |
| 236 |
- index: 1 |
| 237 |
insert: true |
| 238 |
image: https://192.168.0.5/file/file.iso |
| 239 |
username: username |
| 240 |
password: password |
| 241 |
- index: 2 |
| 242 |
insert: false |
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
Return Values |
| 247 |
------------- |
| 248 |
|
| 249 |
msg (success, str, Successfully performed the virtual media operation.) |
| 250 |
Successfully performed the virtual media operation. |
| 251 |
|
| 252 |
|
| 253 |
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.'}]}}) |
| 254 |
Details of the HTTP Error. |
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
Status |
| 261 |
------ |
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
Authors |
| 268 |
~~~~~~~ |
| 269 |
|
| 270 |
- Felix Stephen (@felixs88) |
| 271 |
|