| 1 | # idrac_firmware |
| 2 | |
| 3 | Update the Firmware by connecting to a network share (CIFS, NFS, HTTP, HTTPS, FTP) that contains a catalog of available updates. |
| 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 | omsdk |
| 15 | ``` |
| 16 | ### Production |
| 17 | Requirements to use the role. |
| 18 | ``` |
| 19 | ansible |
| 20 | python |
| 21 | omsdk |
| 22 | ``` |
| 23 | |
| 24 | ### Ansible collections |
| 25 | Collections required to use the role |
| 26 | ``` |
| 27 | dellemc.openmanage |
| 28 | ``` |
| 29 | |
| 30 | ## Role Variables |
| 31 | |
| 32 | <table> |
| 33 | <thead> |
| 34 | <tr> |
| 35 | <th>Name</th> |
| 36 | <th>Required</th> |
| 37 | <th>Default Value</th> |
| 38 | <th>Choices</th> |
| 39 | <th>Type</th> |
| 40 | <th>Description</th> |
| 41 | </tr> |
| 42 | </thead> |
| 43 | <tbody> |
| 44 | <tr> |
| 45 | <td>hostname</td> |
| 46 | <td>true</td> |
| 47 | <td></td> |
| 48 | <td></td> |
| 49 | <td>str</td> |
| 50 | <td>- iDRAC IP Address</td> |
| 51 | </tr> |
| 52 | <tr> |
| 53 | <td>username</td> |
| 54 | <td>true</td> |
| 55 | <td></td> |
| 56 | <td></td> |
| 57 | <td>str</td> |
| 58 | <td>- iDRAC username</td> |
| 59 | </tr> |
| 60 | <tr> |
| 61 | <td>password</td> |
| 62 | <td>true</td> |
| 63 | <td></td> |
| 64 | <td></td> |
| 65 | <td>str</td> |
| 66 | <td>- iDRAC user password.</td> |
| 67 | </tr> |
| 68 | <tr> |
| 69 | <td>https_port</td> |
| 70 | <td>false</td> |
| 71 | <td>443</td> |
| 72 | <td></td> |
| 73 | <td>int</td> |
| 74 | <td>- iDRAC port.</td> |
| 75 | </tr> |
| 76 | <tr> |
| 77 | <td>validate_certs</td> |
| 78 | <td>false</td> |
| 79 | <td>true</td> |
| 80 | <td></td> |
| 81 | <td>bool</td> |
| 82 | <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> |
| 83 | </tr> |
| 84 | <tr> |
| 85 | <td>ca_path</td> |
| 86 | <td>false</td> |
| 87 | <td></td> |
| 88 | <td></td> |
| 89 | <td>path</td> |
| 90 | <td>- The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.</td> |
| 91 | </tr> |
| 92 | <tr> |
| 93 | <td>https_timeout</td> |
| 94 | <td>false</td> |
| 95 | <td>30</td> |
| 96 | <td></td> |
| 97 | <td>int</td> |
| 98 | <td>- The HTTPS socket level timeout in seconds.</td> |
| 99 | </tr> |
| 100 | <tr> |
| 101 | <td>share_name</td> |
| 102 | <td>true</td> |
| 103 | <td></td> |
| 104 | <td></td> |
| 105 | <td>str</td> |
| 106 | <td>- Network share path of update repository. CIFS, NFS, HTTP, HTTPS and FTP share types are supported.</td> |
| 107 | </tr> |
| 108 | <tr> |
| 109 | <td>share_user</td> |
| 110 | <td>false</td> |
| 111 | <td></td> |
| 112 | <td></td> |
| 113 | <td>str</td> |
| 114 | <td>- Network share user in the format 'user@domain' or 'domain\\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share.</td> |
| 115 | </tr> |
| 116 | <tr> |
| 117 | <td>share_password</td> |
| 118 | <td>false</td> |
| 119 | <td></td> |
| 120 | <td></td> |
| 121 | <td>str</td> |
| 122 | <td>- Network share user password. This option is mandatory for CIFS Network Share.</td> |
| 123 | </tr> |
| 124 | <tr> |
| 125 | <td>catalog_file_name</td> |
| 126 | <td>false</td> |
| 127 | <td>Catalog.xml</td> |
| 128 | <td></td> |
| 129 | <td>str</td> |
| 130 | <td>- Catalog file name relative to the I(share_name</td> |
| 131 | </tr> |
| 132 | <tr> |
| 133 | <td>ignore_cert_warning</td> |
| 134 | <td>false</td> |
| 135 | <td>true</td> |
| 136 | <td></td> |
| 137 | <td>bool</td> |
| 138 | <td>- Specifies if certificate warnings are ignored when HTTPS share is used.</br>- If C(true) option is set, then the certificate warnings are ignored.</td> |
| 139 | </tr> |
| 140 | <tr> |
| 141 | <td>apply_update</td> |
| 142 | <td>false</td> |
| 143 | <td>true</td> |
| 144 | <td></td> |
| 145 | <td>bool</td> |
| 146 | <td> - If I(apply_update) is set to C(true), then the packages are applied.</br>- If I(apply_update) is set to C(false), no updates are applied, and a catalog report of packages is generated and returned.</td> |
| 147 | </tr> |
| 148 | <tr> |
| 149 | <td>reboot</td> |
| 150 | <td>false</td> |
| 151 | <td>false</td> |
| 152 | <td></td> |
| 153 | <td>bool</td> |
| 154 | <td>- Provides the option to apply the update packages immediately or in the next reboot.</br> - If I(reboot) is set to C(true), then the packages are applied immediately.</br>- If I(reboot) is set to C(false), then the packages are staged and applied in the next reboot.</br>- Packages that do not require a reboot are applied immediately irrespective of I (reboot). |
| 155 | </td> |
| 156 | </tr> |
| 157 | <tr> |
| 158 | <td>proxy_support</td> |
| 159 | <td>false</td> |
| 160 | <td>Off</td> |
| 161 | <td>"ParametersProxy", "DefaultProxy", "Off"</td> |
| 162 | <td>str</td> |
| 163 | <td>- Specifies if a proxy should be used.</br>- Proxy parameters are applicable on C(HTTP), C(HTTPS), and C(FTP) share type of repositories.</br> - C(ParametersProxy), sets the proxy parameters for the current firmware operation.</br>- C(DefaultProxy), iDRAC uses the proxy values set by default.</br>- Default Proxy can be set in the Lifecycle Controller attributes using M(dellemc.openmanage.idrac_attributes).</br>- C(Off), will not use the proxy.</br>- For iDRAC8 based servers, use proxy server with basic authentication.</br>- For iDRAC9 based servers, ensure that you use digest authentication for the proxy server, basic authentication is not supported. |
| 164 | </td> |
| 165 | </tr> |
| 166 | <tr> |
| 167 | <td>proxy_server</td> |
| 168 | <td>false</td> |
| 169 | <td></td> |
| 170 | <td></td> |
| 171 | <td>str</td> |
| 172 | <td>- The IP address of the proxy server.</br>- This IP will not be validated. The download job will be created even for invalid I(proxy_server).</br>- Please check the results of the job for error details.</br>- This is required when I(proxy_support) is C(ParametersProxy). </td> |
| 173 | </tr> |
| 174 | <tr> |
| 175 | <td>proxy_port</td> |
| 176 | <td>false</td> |
| 177 | <td></td> |
| 178 | <td></td> |
| 179 | <td>int</td> |
| 180 | <td>- The Port for the proxy server.</br>- This is required when I(proxy_support) is C(ParametersProxy).</td> |
| 181 | </tr> |
| 182 | <tr> |
| 183 | <td>proxy_type</td> |
| 184 | <td>false</td> |
| 185 | <td></td> |
| 186 | <td>HTTP, SOCKS</td> |
| 187 | <td>str</td> |
| 188 | <td>- The proxy type of the proxy server.</br>- This is required when I(proxy_support) is C(ParametersProxy).</td> |
| 189 | </tr> |
| 190 | <tr> |
| 191 | <td>proxy_uname</td> |
| 192 | <td>false</td> |
| 193 | <td></td> |
| 194 | <td></td> |
| 195 | <td>str</td> |
| 196 | <td>- The user name for the proxy server.</td> |
| 197 | </tr> |
| 198 | <tr> |
| 199 | <td>proxy_passwd</td> |
| 200 | <td>false</td> |
| 201 | <td></td> |
| 202 | <td></td> |
| 203 | <td>str</td> |
| 204 | <td>- The password for the proxy server.</td> |
| 205 | </tr> |
| 206 | <tr> |
| 207 | <td>job_wait</td> |
| 208 | <td>false</td> |
| 209 | <td></td> |
| 210 | <td>true</td> |
| 211 | <td>bool</td> |
| 212 | <td>- Whether to wait for job completion or not.</td> |
| 213 | </tr> |
| 214 | </tbody> |
| 215 | </table> |
| 216 | |
| 217 | ## Fact variables |
| 218 | |
| 219 | <table> |
| 220 | <thead> |
| 221 | <tr> |
| 222 | <th>Name</th> |
| 223 | <th>Sample</th> |
| 224 | <th>Description</th> |
| 225 | </tr> |
| 226 | </thead> |
| 227 | <tbody> |
| 228 | <tr> |
| 229 | <td>idrac_firmware_out</td> |
| 230 | <td>{ |
| 231 | msg: "Successfully updated the firmware." |
| 232 | update_status: { |
| 233 | 'InstanceID': 'JID_XXXXXXXXXXXX', |
| 234 | 'JobState': 'Completed', |
| 235 | 'Message': 'Job completed successfully.', |
| 236 | 'MessageId': 'REDXXX', |
| 237 | 'Name': 'Repository Update', |
| 238 | 'JobStartTime': 'NA', |
| 239 | 'Status': 'Success', |
| 240 | } |
| 241 | }</td> |
| 242 | <td>Returns the output of the firmware update status</td> |
| 243 | </tbody> |
| 244 | </table> |
| 245 | |
| 246 | ## Examples |
| 247 | ----- |
| 248 | |
| 249 | ```yml |
| 250 | - name: Update firmware from repository on a NFS Share |
| 251 | ansible.builtin.include_role: |
| 252 | name: idrac_firmware |
| 253 | vars: |
| 254 | hostname: "192.168.0.1" |
| 255 | username: "username" |
| 256 | password: "password" |
| 257 | share_name: "192.168.0.0:/share" |
| 258 | reboot: true |
| 259 | job_wait: true |
| 260 | apply_update: true |
| 261 | catalog_file_name: "Catalog.xml" |
| 262 | |
| 263 | ``` |
| 264 | ```yml |
| 265 | - name: Update firmware from repository on a CIFS Share |
| 266 | ansible.builtin.ansible.builtin.include_role: |
| 267 | name: idrac_firmware |
| 268 | vars: |
| 269 | hostname: "192.168.0.1" |
| 270 | username: "username" |
| 271 | password: "password" |
| 272 | share_name: "full_cifs_path" |
| 273 | share_user: "share_user" |
| 274 | share_password: "share_password" |
| 275 | reboot: true |
| 276 | job_wait: true |
| 277 | apply_update: true |
| 278 | catalog_file_name: "Catalog.xml" |
| 279 | ``` |
| 280 | ```yml |
| 281 | - name: Update firmware from repository on a HTTP |
| 282 | ansible.builtin.include_role: |
| 283 | name: idrac_firmware |
| 284 | vars: |
| 285 | hostname: "192.168.0.1" |
| 286 | username: "username" |
| 287 | password: "password" |
| 288 | share_name: "http://downloads.dell.com" |
| 289 | reboot: true |
| 290 | job_wait: true |
| 291 | apply_update: true |
| 292 | ``` |
| 293 | ```yml |
| 294 | - name: Update firmware from repository on a HTTPS |
| 295 | ansible.builtin.include_role: |
| 296 | name: idrac_firmware |
| 297 | vars: |
| 298 | hostname: "192.168.0.1" |
| 299 | username: "username" |
| 300 | password: "password" |
| 301 | share_name: "https://downloads.dell.com" |
| 302 | reboot: true |
| 303 | job_wait: true |
| 304 | apply_update: true |
| 305 | ``` |
| 306 | ```yml |
| 307 | - name: Update firmware from repository on a HTTPS via proxy |
| 308 | ansible.builtin.include_role: |
| 309 | name: idrac_firmware |
| 310 | vars: |
| 311 | hostname: "192.168.0.1" |
| 312 | username: "username" |
| 313 | password: "password" |
| 314 | share_name: "https://downloads.dell.com" |
| 315 | reboot: true |
| 316 | job_wait: true |
| 317 | apply_update: true |
| 318 | proxy_support: ParametersProxy |
| 319 | proxy_server: 192.168.1.10 |
| 320 | proxy_type: HTTP |
| 321 | proxy_port: 80 |
| 322 | proxy_uname: "proxy_user" |
| 323 | proxy_passwd: "proxy_pwd" |
| 324 | ``` |
| 325 | ```yml |
| 326 | - name: Update firmware from repository on a FTP |
| 327 | ansible.builtin.include_role: |
| 328 | name: idrac_firmware |
| 329 | vars: |
| 330 | hostname: "192.168.0.1" |
| 331 | username: "username" |
| 332 | password: "password" |
| 333 | share_name: "ftp://ftp.mydomain.com" |
| 334 | reboot: true |
| 335 | job_wait: true |
| 336 | apply_update: true |
| 337 | ``` |
| 338 | ## Author Information |
| 339 | ------------------ |
| 340 | |
| 341 | Dell Technologies <br> |
| 342 | Sachin Apagundi ([email protected]) 2023 |