Hello Hagai,
This got me going. Thank you.
Is there a way to match a given model (given that I set the ‘Model’ var earlier in the playbook)? I need the firmware and that works perfectly but, I need to limit the firmware that goes to a certain model of server.
Thanks,
Hank
Something like:
-
debug: var=Model
-
debug: msg={{ item.key }}
when: item.key == ‘idrac’
with_recursive:
-
{ name: dict, args: firmware, “{{ Model }}” }
-
{ name: dict, args: “{{item.value}}” }
Here is the output of the above:
TASK: [idrac-firmware | debug var=Model] **************************************
ok: [] => {
“var”: {
“Model”: “PowerEdge_R730xd”
}
}
TASK: [idrac-firmware | debug msg={{ item.key }}] *****************************
skipping: [] => (item={‘key’: ‘bios’, ‘value’: {‘url’: ‘http://downloads.dell.com/FOLDER02797483M/1/BIOS_CNN4X_WN64_2.5.2.EXE’, ‘search’: ‘none’, ‘target_version’: ‘2.5.2’, ‘minimum_version’: ‘none’, ‘filename’: ‘BIOS_CNN4X_WN64_2.5.2.EXE’}})
skipping: [] => (item={‘key’: ‘os_collector’, ‘value’: {‘url’: ‘http://downloads.dell.com/FOLDER02775623M/1/Diagnostics_Application_5W2KP_WN64_OSC_1.1_X10-00.EXE’, ‘search’: ‘none’, ‘target_version’: 1.1000000000000001, ‘minimum_version’: ‘none’, ‘filename’: ‘Diagnostics_Application_5W2KP_WN64_OSC_1.1_X10-00.EXE’}})
skipping: [] => (item={‘key’: ‘bios’, ‘value’: {‘url’: ‘http://downloads.dell.com/FOLDER02868051M/1/BIOS_XR23Y_WN64_1.2.10.EXE’, ‘search’: ‘none’, ‘target_version’: ‘1.2.10’, ‘minimum_version’: ‘none’, ‘filename’: ‘BIOS_XR23Y_WN64_1.2.10.EXE’}})
ok: [] => (item={‘key’: ‘idrac’, ‘value’: {‘url’: ‘http://downloads.dell.com/FOLDER02881013M/1/iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE’, ‘search’: ‘none’, ‘target_version’: ‘2.10.10.10’, ‘minimum_version’: ‘none’, ‘filename’: ‘iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE’}}) => {
“item”: {
“key”: “idrac”,
“value”: {
“filename”: “iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE”,
“minimum_version”: “none”,
“search”: “none”,
“target_version”: “2.10.10.10”,
“url”: “http://downloads.dell.com/FOLDER02881013M/1/iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE”
}
},
“msg”: “idrac”
}
skipping: [] => (item={‘key’: ‘bios’, ‘value’: {‘url’: ‘http://downloads.dell.com/FOLDER02868051M/1/BIOS_XR23Y_WN64_1.2.10.EXE’, ‘search’: ‘none’, ‘target_version’: ‘1.2.10’, ‘minimum_version’: ‘none’, ‘filename’: ‘BIOS_XR23Y_WN64_1.2.10.EXE’}})
ok: [] => (item={‘key’: ‘idrac’, ‘value’: {‘url’: ‘http://downloads.dell.com/FOLDER02881013M/1/iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE’, ‘search’: ‘none’, ‘target_version’: ‘2.10.10.10’, ‘minimum_version’: ‘none’, ‘filename’: ‘iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE’}}) => {
“item”: {
“key”: “idrac”,
“value”: {
“filename”: “iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE”,
“minimum_version”: “none”,
“search”: “none”,
“target_version”: “2.10.10.10”,
“url”: “http://downloads.dell.com/FOLDER02881013M/1/iDRAC-with-Lifecycle-Controller_Firmware_FM1PC_WN64_2.10.10.10_A00.EXE”
}
},
“msg”: “idrac”
}