-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhost_patch.j2
39 lines (39 loc) · 1.82 KB
/
host_patch.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
"status": {
"hardware": {
"hostname": "${hostname}",
"nics": [
{
"ip": "${ipaddr}",
"mac": "{{ hardware_json.ansible_facts.redfish_facts.nic.entries[0][1][nicnum].PermanentMACAddress }}",
"model": "{{ hardware_json.ansible_facts.redfish_facts.nic.entries[0][1][nicnum].Description }}",
"speedGbps": {{ hardware_json.ansible_facts.redfish_facts.nic.entries[0][1][nicnum].SpeedMbps / 1024 }},
"vlanId": 0,
"pxe": true,
"name": "eno1"
}
],
"systemVendor": {
"manufacturer": "{{ hardware_json.ansible_facts.redfish_facts.system.entries[0][1].Manufacturer }}",
"productName": "{{ hardware_json.ansible_facts.redfish_facts.system.entries[0][1].Model }}",
"serialNumber": "{{ hardware_json.ansible_facts.redfish_facts.system.entries[0][1].SerialNumber }}"
},
"firmware": {
"bios": {
"date": "unassigned",
"vendor": "{{ hardware_json.ansible_facts.redfish_facts.bios_attribute.entries[0][1].SystemManufacturer }}",
"version": "{{ hardware_json.ansible_facts.redfish_facts.bios_attribute.entries[0][1].SystemBiosVersion }}"
}
},
"ramMebibytes": {{ (hardware_json.ansible_facts.redfish_facts.system.entries[0][1].MemorySummary.TotalSystemMemoryGiB * 1024) | int }},
"storage": [],
"cpu": {
"arch": "x86_64",
"model": "{{ hardware_json.ansible_facts.redfish_facts.system.entries[0][1].ProcessorSummary.Model }}",
"clockMegahertz": {{ hardware_json.ansible_facts.redfish_facts.bios_attribute.entries[0][1].ProcCoreSpeed.split(" ")[0] | float * 1024 }},
"count": {{ hardware_json.ansible_facts.redfish_facts.system.entries[0][1].ProcessorSummary.LogicalProcessorCount | default(0) }},
"flags": []
}
}
}
}