- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Remote Server Management
- >
- How to set boot order via ansible? (community.gene...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2023 05:56 AM - last edited on тАО01-26-2023 08:18 PM by support_s
тАО01-18-2023 05:56 AM - last edited on тАО01-26-2023 08:18 PM by support_s
Hi!
I'm trying to configure a new bunch of servers (HPE ProLiant DL385 Gen 10 Plus v2) witn ansible and the community.general collection via redfish_config.
Setting normal bios parameters, ilo config does work as expected.
But the SetBootOrder command fails with a "400 on PATCH request".
fatal: [localhost]: FAILED! => {"changed": false, "msg": "HTTP Error 400 on PATCH request to 'https://10.x.x.11/redfish/v1/Systems/1/', extended message: 'Bad Request'"}
I could read the current bootorder via GetBootOrder:
{
"BootOptionReference": "Boot001A",
"DisplayName": "OCP Slot 10 Port 1 : Intel(R) Ethernet Network Adapter I350-T4 for OCP NIC 3.0 (PXE IPv4)"
},
{
"BootOptionReference": "Boot000E",
"DisplayName": "Generic USB Boot"
},
{
"BootOptionReference": "Boot000F",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 1"
},
{
"BootOptionReference": "Boot0010",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 2"
},
{
"BootOptionReference": "Boot0011",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 3"
},
{
"BootOptionReference": "Boot0012",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 4"
},
{
"BootOptionReference": "Boot0013",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 5"
},
{
"BootOptionReference": "Boot0014",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 6"
},
{
"BootOptionReference": "Boot0015",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 7"
},
{
"BootOptionReference": "Boot0016",
"DisplayName": "Storage Slot 12 : HPE MR416i-a Gen10+ - Box 3, Bay 8"
},
{
"BootOptionReference": "Boot0019",
"DisplayName": "OCP Slot 10 Port 1 : Intel(R) Ethernet Network Adapter I350-T4 for OCP NIC 3.0 (HTTP(S) IPv4)"
},
{
"BootOptionReference": "Boot0017",
"DisplayName": "OCP Slot 10 Port 1 : Intel(R) Ethernet Network Adapter I350-T4 for OCP NIC 3.0 (PXE IPv6)"
},
{
"BootOptionReference": "Boot0018",
"DisplayName": "OCP Slot 10 Port 1 : Intel(R) Ethernet Network Adapter I350-T4 for OCP NIC 3.0 (HTTP(S) IPv6)"
}
This is the ansible code for reading:
- name: Get info
community.general.redfish_info:
category: Systems
command: GetBootOrder
baseuri: "{{ baseuri[item.key] }}"
username: "{{ username }}"
password: "{{ credentials[item.key] }}"
register: just_all
- name: Debug
ansible.builtin.debug:
msg: "{{ just_all }}"
and the part for (trying) to set the new order:
- name: Set boot order
community.general.redfish_config:
category: Systems
command: SetBootOrder
boot_order:
- Boot000E
- Boot001A
- Boot000F
- Boot0010
- Boot0011
- Boot0012
- Boot0013
- Boot0014
- Boot0015
- Boot0016
- Boot0019
- Boot0017
- Boot0018
baseuri: "{{ baseuri[item.key] }}"
auth_token: "{{ result.session.token }}"
Which fails.
Any hints what could be wrong?
Kind regards,
Christian
Solved! Go to Solution.
- Tags:
- Port
- Prolaint server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2023 08:04 AM
тАО01-25-2023 08:04 AM
Re: How to set boot order via ansible? (community.general.redfish_config)
Hi,
I personally have not tried this script but here is a good documentation to start with.
https://developer.hpe.com/blog/setting-bios-and-storage-controller-properties-with-redfish/
https://developer.hpe.com/blog/master-the-redfish-server-states-to-improve-your-monitoring-and-manageme/
Thank You!
I work with HPE but opinions expressed here are mine.
Recent Support Video Releases
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2023 10:14 AM
тАО01-30-2023 10:14 AM
SolutionThanks for the pointers!
I solved it by using a commission script with HPEs ilorest command within the MAAS that we use to deploy the base Ubuntu os installation.
With ilorest it works as expected. If I find the time, I will open an issue for the ansible collection used. May be a contributor to that project has more insight and can help to solved it for the community collection.
Kind regards,
Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2023 06:57 AM
тАО01-31-2023 06:57 AM
Re: How to set boot order via ansible? (community.general.redfish_config)
Hello Christian,
Perfect!
We are glad to know you were able to find the solution and thank you for keeping us updated.
Thanks,
Sunitha G
I'm an HPE employee.
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
