| 1 | # redfish_firmware |
| 2 | |
| 3 | To perform a component firmware update using the image file available on the local or remote system. |
| 4 | |
| 5 | ## Requirements |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | |
| 10 | ### Development |
| 11 | Requirements to develop and contribute to the role. |
| 12 | |
| 13 | ``` |
| 14 | ansible |
| 15 | docker |
| 16 | molecule |
| 17 | python |
| 18 | ``` |
| 19 | |
| 20 | ### Production |
| 21 | |
| 22 | Requirements to use the role. |
| 23 | |
| 24 | ``` |
| 25 | ansible |
| 26 | python |
| 27 | ``` |
| 28 | |
| 29 | ## Ansible collections |
| 30 | |
| 31 | Collections required to use the role. |
| 32 | |
| 33 | ``` |
| 34 | dellemc.openmanage |
| 35 | ``` |
| 36 | |
| 37 | ## Role Variables |
| 38 | |
| 39 | --- |
| 40 | |
| 41 | <table> |
| 42 | <thead> |
| 43 | <tr> |
| 44 | <th>Name</th> |
| 45 | <th>Required</th> |
| 46 | <th>Default Value</th> |
| 47 | <th>Choices</th> |
| 48 | <th>Type</th> |
| 49 | <th>Description</th> |
| 50 | </tr> |
| 51 | </thead> |
| 52 | <tbody> |
| 53 | <tr> |
| 54 | <td>hostname</td> |
| 55 | <td>true</td> |
| 56 | <td></td> |
| 57 | <td></td> |
| 58 | <td>str</td> |
| 59 | <td>- iDRAC IP Address</td> |
| 60 | </tr> |
| 61 | <tr> |
| 62 | <td>username</td> |
| 63 | <td>true</td> |
| 64 | <td></td> |
| 65 | <td></td> |
| 66 | <td>str</td> |
| 67 | <td>- iDRAC username</td> |
| 68 | </tr> |
| 69 | <tr> |
| 70 | <td>password</td> |
| 71 | <td>true</td> |
| 72 | <td></td> |
| 73 | <td></td> |
| 74 | <td>str</td> |
| 75 | <td>- iDRAC user password.</td> |
| 76 | </tr> |
| 77 | <tr> |
| 78 | <td>https_port</td> |
| 79 | <td>false</td> |
| 80 | <td>443</td> |
| 81 | <td></td> |
| 82 | <td>int</td> |
| 83 | <td>- iDRAC port.</td> |
| 84 | </tr> |
| 85 | <tr> |
| 86 | <td>validate_certs</td> |
| 87 | <td>false</td> |
| 88 | <td>true</td> |
| 89 | <td></td> |
| 90 | <td>bool</td> |
| 91 | <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> |
| 92 | </tr> |
| 93 | <tr> |
| 94 | <td>ca_path</td> |
| 95 | <td>false</td> |
| 96 | <td></td> |
| 97 | <td></td> |
| 98 | <td>path</td> |
| 99 | <td>- The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.</td> |
| 100 | </tr> |
| 101 | <tr> |
| 102 | <td>https_timeout</td> |
| 103 | <td>false</td> |
| 104 | <td>30</td> |
| 105 | <td></td> |
| 106 | <td>int</td> |
| 107 | <td>- The socket level timeout in seconds.</td> |
| 108 | </tr> |
| 109 | <tr> |
| 110 | <td>image_uri</td> |
| 111 | <td>false</td> |
| 112 | <td></td> |
| 113 | <td></td> |
| 114 | <td>str</td> |
| 115 | <td>- Firmware Image location URI or local path. |
| 116 | <br>- For example- U(http://<web_address>/components.exe) or /home/firmware_repo/component.exe. |
| 117 | </td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td>transfer_protocol</td> |
| 121 | <td>false</td> |
| 122 | <td>HTTP</td> |
| 123 | <td>"CIFS", "FTP", "HTTP", "HTTPS", "NSF", "OEM", "SCP", "SFTP", "TFTP"</td> |
| 124 | <td>str</td> |
| 125 | <td>- Protocol used to transfer the firmware image file. Applicable for URI based update.</td> |
| 126 | </tr> |
| 127 | <tr> |
| 128 | <td>job_wait</td> |
| 129 | <td>false</td> |
| 130 | <td>true</td> |
| 131 | <td></td> |
| 132 | <td>str</td> |
| 133 | <td>- Provides the option to wait for job completion.</td> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td>job_wait_timeout</td> |
| 137 | <td>false</td> |
| 138 | <td>3600</td> |
| 139 | <td></td> |
| 140 | <td>str</td> |
| 141 | <td>- The maximum wait time of I(job_wait) in seconds. The job is tracked only for this duration. |
| 142 | <br>- This option is applicable when I(job_wait) is C(True). |
| 143 | </td> |
| 144 | </tr> |
| 145 | </tbody> |
| 146 | </table> |
| 147 | |
| 148 | ## Fact variables |
| 149 | |
| 150 | <table> |
| 151 | <thead> |
| 152 | <tr> |
| 153 | <th>Name</th> |
| 154 | <th>Sample</th> |
| 155 | <th>Description</th> |
| 156 | </tr> |
| 157 | </thead> |
| 158 | <tbody> |
| 159 | <tr> |
| 160 | <td>redfish_firmware_out</td> |
| 161 | <td>{ |
| 162 | msg: Successfully submitted the firmware update task. |
| 163 | task: { |
| 164 | "id": "JID_XXXXXXXXXXXX", |
| 165 | "uri": "/redfish/v1/TaskService/Tasks/JID_XXXXXXXXXXXX" |
| 166 | } |
| 167 | }</td> |
| 168 | <td>Returns the output of the firmware update status.</td> |
| 169 | </tr> |
| 170 | </tbody> |
| 171 | </table> |
| 172 | |
| 173 | ## Examples |
| 174 | |
| 175 | --- |
| 176 | |
| 177 | ``` |
| 178 | - name: Update the firmware from a single executable file available in HTTP protocol |
| 179 | ansible.builtin.include_role: |
| 180 | name: redfish_firmware: |
| 181 | vars: |
| 182 | hostname: "192.168.0.1" |
| 183 | username: "username" |
| 184 | password: "password" |
| 185 | image_uri: "http://192.168.0.2/firmware_repo/component.exe" |
| 186 | transfer_protocol: "HTTP" |
| 187 | ``` |
| 188 | |
| 189 | ``` |
| 190 | - name: Update the firmware from a single executable file available in a local path |
| 191 | ansible.builtin.include_role: |
| 192 | name: redfish_firmware: |
| 193 | vars: |
| 194 | hostname: "192.168.0.1" |
| 195 | username: "username" |
| 196 | password: "password" |
| 197 | image_uri: "/home/firmware_repo/component.exe" |
| 198 | ``` |
| 199 | |
| 200 | ``` |
| 201 | - name: Update the firmware from a single executable file available in a HTTP protocol with job_wait_timeout |
| 202 | ansible.builtin.include_role: |
| 203 | name: redfish_firmware: |
| 204 | vars: |
| 205 | hostname: "192.168.0.1" |
| 206 | username: "user_name" |
| 207 | password: "user_password" |
| 208 | ca_path: "/path/to/ca_cert.pem" |
| 209 | image_uri: "http://192.168.0.2/firmware_repo/component.exe" |
| 210 | transfer_protocol: "HTTP" |
| 211 | job_wait_timeout: 600 |
| 212 | ``` |
| 213 | |
| 214 | ## Author Information |
| 215 | |
| 216 | --- |
| 217 | |
| 218 | Dell Technologies <br> |
| 219 | Shivam Sharma ([email protected]) 2023 |