Unsolved

793

April 20th, 2022 08:00

redfish firmware update using proxy

Hello,

 

I am trying to update the idrac, bios, etc firmware using ansible/redfish, but I neet to use a proxy to access downloads.dell.com. I've managed to set the proxy using this playbook, but I cannot use the proxy when running the update playbook:

   - name: Enable proxy in iDRAC
     community.general.idrac_redfish_config:
       category: Manager
       command: SetLifecycleControllerAttributes
       manager_attributes:
         LCAttributes.1.UserProxyServer: "{{ proxy_ip }}"
         LCAttributes.1.UserProxyPort: "{{ proxy_port }}"
         LCAttributes.1.UserProxyType: 'HTTP'
         LCAttributes.1.IgnoreCertWarning: 'ON'
       baseuri: "{{ idrac_ip }}"
       username: "{{ idrac_username}}"
       password: "{{ idrac_password }}"

   - name: Update firmware from a repository on a HTTP share.
     dellemc.openmanage.idrac_firmware:
       idrac_ip:        "{{ idrac_ip }}"
       idrac_user:      "{{ idrac_username }}"
       idrac_password:  "{{ idrac_password }}"
       share_name: "http://downloads.dell.com"
       reboot: True
       job_wait: True
       apply_update: True
       validate_certs: false

Unfortunately the idrac_firmware task fails because it can't reach the Internet. If I do it by hand from the iDRAC webui I can enable the proxy and it works just fine. Any ideea how I could make use of the proxy while updating thru ansible or redfish?

Moderator

 • 

9.7K Posts

April 21st, 2022 05:00

Devopsmonkey,

 

What you would need to do is the following;

 

"ProxySupport@Redfish.AllowableValues": [
"DefaultProxy",
"Off",
"ParametersProxy"
],
"ProxyType@Redfish.AllowableValues": [
"HTTP",
"SOCKS"
],

 

/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellSoftwareInstallationService/Actions/DellSoftwareInstallationService.InstallFromRepository

 

The reason being is that the Install from Repository URI of Redfish does allow you to use the proxy already configured.

 

Let me know if this helps.

 

 

 

April 27th, 2022 01:00

I dont quite understand what I should do with those endpints. Could you give me an example of how you would use them in a request please?

Moderator

 • 

9.7K Posts

April 27th, 2022 08:00

Devopsmonkey,

 

To clarify,

 

DefaultProxy means use proxy that is already configured

Parameters means you're specifying the parameters

 

Below you can see the proxy attribute names

 

 

Let me know if this helps.

 

April 28th, 2022 02:00

I understand what DefaultProxy means, what I am trying to understand is how the POST request should look like because I need to modify the ansible module in order to support that.

 

 

April 28th, 2022 03:00

I think I've found what I need, I'll just modify the payload generation from the module, from this:

 

payload = {"RebootNeeded": reboot, "CatalogFile": catalog_file_name, "ApplyUpdate": str(apply_update), "IgnoreCertWarning": CERT_WARN[ignore_cert_warning]}

 

to this:

 

payload = {"RebootNeeded": reboot, "CatalogFile": catalog_file_name, "ApplyUpdate": str(apply_update), "IgnoreCertWarning": CERT_WARN[ignore_cert_warning], "ProxySupport": "DefaultProxy"}

 

 

0 events found

No Events found!

Top