<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to set boot order via ansible? (community.general.redfish_config) in Server Management - Remote Server Management</title>
    <link>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181046#M9619</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Setting normal bios parameters, ilo config does work as expected.&lt;/P&gt;&lt;P&gt;But the SetBootOrder command fails with a "400 on PATCH request".&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;fatal: [localhost]: FAILED! =&amp;gt; {"changed": false, "msg": "HTTP Error 400 on PATCH request to '&lt;A href="https://10.x.x.11/redfish/v1/Systems/1/" target="_blank"&gt;https://10.x.x.11/redfish/v1/Systems/1/&lt;/A&gt;', extended message: 'Bad Request'"}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I could read the current bootorder via GetBootOrder:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{
    "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)"
}&lt;/LI-CODE&gt;&lt;P&gt;This is the ansible code for reading:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;- 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 }}"&lt;/LI-CODE&gt;&lt;P&gt;and the part for (trying) to set the new order:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;- 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 }}"&lt;/LI-CODE&gt;&lt;P&gt;Which fails.&lt;/P&gt;&lt;P&gt;Any hints what could be wrong?&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 04:18:36 GMT</pubDate>
    <dc:creator>costelter</dc:creator>
    <dc:date>2023-01-27T04:18:36Z</dc:date>
    <item>
      <title>How to set boot order via ansible? (community.general.redfish_config)</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181046#M9619</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Setting normal bios parameters, ilo config does work as expected.&lt;/P&gt;&lt;P&gt;But the SetBootOrder command fails with a "400 on PATCH request".&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;fatal: [localhost]: FAILED! =&amp;gt; {"changed": false, "msg": "HTTP Error 400 on PATCH request to '&lt;A href="https://10.x.x.11/redfish/v1/Systems/1/" target="_blank"&gt;https://10.x.x.11/redfish/v1/Systems/1/&lt;/A&gt;', extended message: 'Bad Request'"}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I could read the current bootorder via GetBootOrder:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{
    "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)"
}&lt;/LI-CODE&gt;&lt;P&gt;This is the ansible code for reading:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;- 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 }}"&lt;/LI-CODE&gt;&lt;P&gt;and the part for (trying) to set the new order:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;- 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 }}"&lt;/LI-CODE&gt;&lt;P&gt;Which fails.&lt;/P&gt;&lt;P&gt;Any hints what could be wrong?&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 04:18:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181046#M9619</guid>
      <dc:creator>costelter</dc:creator>
      <dc:date>2023-01-27T04:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to set boot order via ansible? (community.general.redfish_config)</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181612#M9629</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I&amp;nbsp; personally have not tried this script but here is a good documentation to start with.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.hpe.com/blog/setting-bios-and-storage-controller-properties-with-redfish/" target="_blank"&gt;https://developer.hpe.com/blog/setting-bios-and-storage-controller-properties-with-redfish/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developer.hpe.com/blog/master-the-redfish-server-states-to-improve-your-monitoring-and-manageme/" target="_blank"&gt;https://developer.hpe.com/blog/master-the-redfish-server-states-to-improve-your-monitoring-and-manageme/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank You!&lt;BR /&gt;I work with HPE but opinions expressed here are mine.&lt;BR /&gt;&lt;A href="https://support.hpe.com/connect/s/search?language=en_US#t=Videos&amp;amp;sort=%40hpescuniversaldate%20descending&amp;amp;layout=card&amp;amp;numberOfResults=100" target="_blank"&gt;Recent Support Video Releases&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 16:04:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181612#M9629</guid>
      <dc:creator>Suman_1978</dc:creator>
      <dc:date>2023-01-25T16:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to set boot order via ansible? (community.general.redfish_config)</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181817#M9630</link>
      <description>&lt;P&gt;Thanks for the pointers!&lt;/P&gt;&lt;P&gt;I solved it by using a commission script with HPEs ilorest command within the &lt;A title="Canonical MAAS" href="https://maas.io" target="_blank" rel="noopener"&gt;MAAS&lt;/A&gt; that we use to deploy the base Ubuntu os installation.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 18:14:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181817#M9630</guid>
      <dc:creator>costelter</dc:creator>
      <dc:date>2023-01-30T18:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set boot order via ansible? (community.general.redfish_config)</title>
      <link>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181869#M9631</link>
      <description>&lt;P&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/2077884"&gt;@costelter&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Christian,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Perfect!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We are glad to know you were able to find the solution and thank you for keeping us updated.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 14:57:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-remote-server/how-to-set-boot-order-via-ansible-community-general-redfish/m-p/7181869#M9631</guid>
      <dc:creator>Sunitha_Mod</dc:creator>
      <dc:date>2023-01-31T14:57:10Z</dc:date>
    </item>
  </channel>
</rss>

