Hi,

With this playbook we still getting msg output with first debug that i 
mentioned in my mail. It fails where second debug defined with 'selectattr'

On Monday, January 7, 2019 at 9:51:41 PM UTC+5:30, Rama wrote:
>
> Hi All,
>
> Our required in-built module gives huge output of different keys that have 
> multiple values with objects. I used 'with_dict' and when to narrow and get 
> desired output as below.  Here also am facing a road block that how can I 
> get the element where any value doesn't meet. How can get output of the 
> block when "status": "CRITICAL" instead of all.
>
> Output:
> "msg": {
>         "key": "devices",
>         "value": [
>             {
>                 "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"
>             },
>             {
>                 "configuration": "Configured",
>                 "version": "PD-0.7",
>                 "label": "device-3",
>                 "location": "3",
>                 "serial_number": "PWH12GXF",
>                 "status": "CRITICAL"
>             } 
>         ]
>     }
>
>
>
> Desired output:
> "configuration": "Configured",
>  version": "PD-0.7",
>  "label": "device-3",
>  "location": "3",
>  "serial_number": "PWH12GXF",
>  "status": "CRITICAL"
>

-- 
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/4333560d-5759-41be-a45b-66e6aadc4f48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to