04-05-2024 10:05 AM
hello
any idea how top add PXE boot into this policy? not sure what Slot and Interface name mean
---
- name: "Boot Order Policy for FC"
vars:
api_info: &api_info_fc
api_private_key: "{{ api_private_key }}"
api_key_id: "{{ api_key_id }}"
api_uri: "{{ api_uri | default(omit) }}"
validate_certs: "{{ validate_certs | default(omit) }}"
state: "{{ state | default(omit) }}"
block:
- cisco.intersight.intersight_rest_api:
<<: *api_info_fc
resource_path: /boot/PrecisionPolicies
query_params:
$filter: "Name eq '{{ fc_boot_order_policy_name }}'"
api_body: {
"Name": "{{ fc_boot_order_policy_name }}",
"Description": "{{ fc_boot_order_policy_description }}",
"Organization": {
"Moid": "{{ intersight_org.api_response.Moid }}"
},
Tags: [{Key: "configmode", Value: "ansible"},{Key: "prefix", Value: "{{ prefix }}"}],
"ConfiguredBootMode": "{{ boot_mode }}",
"EnforceUefiSecureBoot": "{{ enable_uefi_secureboot|bool }}",
"BootDevices": [
{
"Name": "KVM-Mapped-ISO",
"Subtype": "kvm-mapped-dvd",
"Enabled": true,
"ObjectType": "boot.VirtualMedia"
},
{
"Name": "{{ san_boot_device_1a_name }}",
"Lun": "{{ lun_id }}",
"InterfaceName": "{{ name_of_vhba_a }}",
"Wwpn": "{{ san_boot_target_1a_wwpn }}",
"Enabled": true,
"ObjectType": "boot.San"
},
{
"Name": "{{ san_boot_device_2a_name }}",
"Lun": "{{ lun_id }}",
"InterfaceName": "{{ name_of_vhba_a }}",
"Wwpn": "{{ san_boot_target_2a_wwpn }}",
"Enabled": true,
"ObjectType": "boot.San"
},
{
"Name": "{{ san_boot_device_1b_name }}",
"Lun": "{{ lun_id }}",
"InterfaceName": "{{ name_of_vhba_b }}",
"Wwpn": "{{ san_boot_target_1b_wwpn }}",
"Enabled": true,
"ObjectType": "boot.San"
},
{
"Name": "{{ san_boot_device_2b_name }}",
"Lun": "{{ lun_id }}",
"InterfaceName": "{{ name_of_vhba_b }}",
"Wwpn": "{{ san_boot_target_2b_wwpn }}",
"Enabled": true,
"ObjectType": "boot.San"
}
]
}
register: fc_boot_policy
when: configure_fc == 'true'
04-05-2024 12:04 PM
{
"Name": "demo",
"IpType": "IPv4",
"Slot": "MLOM",
"InterfaceName": "eth0",
"Enabled": true,
"ObjectType": "boot.Pxe",
"InterfaceSource": "name",
"Port": -1
}
04-05-2024 12:46 PM
hi
but currently i dont have any servers yet. only policies and templates
04-05-2024 12:55 PM
also what is INterfaceSource?
04-05-2024 01:12 PM
InterfaceSource value is based on what option you have selected: Interface Name or Port or MAC Address under PXE Boot device
For Interface Name, the value is "name"
For Port, the value is "port"
For MAC Address, the value is "mac"
04-05-2024 12:54 PM
For now, you can set it to MLOM and once you have the Servers, you can identify the Slot ID and update it accordingly.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide