Hi,

I am facing another issue. In the first scenario we used 
*{{hw_health.storage['Controller 
on System Board']['logical_drives'][0]['physical_drives'] | 
selectattr('status', 'match', 'Failed') | list}} *where only one 
physical_drives.  Some servers having two "physical_drives" sections. The 
status: Failed may happen either sections.   Can you please help me here 
how can we get the Failed list from either.  


Output :
"storage": {
                "Controller on System Board": {
                    "logical_drives": [
                        {
                            "physical_drives": [
                                {
                                    "configuration": "Configured",
                                    "version": "PD-0.7",
                                    "label": "device-1",
                                    "location": "1",
                                    "serial_number": "PWH12GVF",
                                    "status": "OK"
                                },
                                {
                                    "configuration": "Configured",
                                    "version": "PD-0.7",
                                    "label": "device-2",
                                    "location": "2",
                                    "serial_number": "PWH12GWF",
                                    "status": "OK"
                                }
                            ],                           
                        },
                        {
                            "physical_drives": [
                                {
                                    "configuration": "Configured",
                                    "version": "PD-0.7",
                                    "label": "device-3",
                                    "location": "3",
                                    "serial_number": "PWH12GVA",
                                    "status": "OK"
                                },
                                {
                                    "configuration": "Configured",
                                    "version": "PD-0.7",
                                    "label": "device-4",
                                    "location": "4",
                                    "serial_number": "PWH12GWB",
                                    "status": "OK"
                                }
                            ],                            
                        }
                    ],              
                }
            }

On Saturday, January 19, 2019 at 3:06:59 PM UTC+5:30, Rama wrote:
>
> Hi,
>
> Thank you for your assistance. In this case selectattr match works that as 
> I expected.
>
> On Wed, Jan 9, 2019 at 11:01 PM Kai Stian Olstad <
> [email protected]> wrote:
>
>> On Wednesday, 9 January 2019 18:10:43 CET Ramaswamy Rajavarapu wrote:
>> > ah, again the same error with msg rather than var
>> > TASK [debug]
>> > 
>> **************************************************************************************************************************************
>> > fatal: [localhost]: FAILED! => {"msg": "Unexpected failure during module
>> > execution."}
>>
>> Then you have some other typos in you debug task somewhere.
>>
>>
>> -- 
>> Kai Stian Olstad
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/2354770.Xt2EfTHqL5%40x1
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fb6ea07e-db20-431c-a042-d20a1dc35603%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to