I would use the json output option of the sos tool and then filter things.
Manipulating that big block of text will be very cumbersome and fragile.

Fyi this list is not exactly a 'team' but more a collection of individuals
willing to help.



On Wed, 2 Sep 2020 at 13:13, Nagesh sheregar <[email protected]> wrote:

> Hi Team,
>
> Any help is appreciated?
>
> Thanks
>
> On Tue, Sep 1, 2020 at 5:32 PM Nagesh sheregar <[email protected]>
> wrote:
>
>> Hi Team,
>>
>> i would like to see only GREEN/RED in out put, can you please let me know
>> how i can filter it?
>> Playbook:
>>
>> - name: sddc health
>>   command: /opt/vmware/sddc-support/sos --health-check
>>   register: find_output
>> - debug:
>>      var: find_output
>> =========================
>>
>> Output:
>>
>> ====================
>>
>>  SL# |                                  Area
>>    |                            Title                            | State |",
>>
>> "+-----+-----------------------------------------------------------------------+-------------------------------------------------------------+-------+",
>>             "|  1  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  2  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  3  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  4  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  5  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  6  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  7  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  8  |
>>                  |                    Total no. of disks : 9
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  9  |
>>                  |              ** Stretched cluster is disabled.
>>     |       |",
>>             "|     |
>>                  |                  Cluster vSAN Health Status
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |          ** Deduplication enabled on this cluster.
>>     |       |",
>>             "|     |
>>                  |           ** Encryption disabled on this cluster.
>>    |       |",
>>             "|     |
>>                  |           ** Compression enabled on this cluster.
>>    |       |",
>>             "|     |
>>                  |              Total no. of hosts in cluster : 8
>>     | \u001b[1;32mGREEN\u001b[0m |",
>>             "|  10 |
>>                  |
>> Node-20a8c662-1bab-43ff-b190-71d6a9c0bc51-NSX-controller-3 |
>> \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                        centos-6-dHJ8
>>     | \u001b[1;32mGREEN\u001b[0m |",
>>             "|     |
>>                  |                      WIN2012DTC-64-FxZS
>>    | \u001b[1;32mGREEN\u001b[0m |",
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>>
>>
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/f80f2498-1258-4f99-9bf5-f2a0edde706bn%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/f80f2498-1258-4f99-9bf5-f2a0edde706bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
>
>
>
>
>
> --
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAFu5ZNxU_zNEdZuC1J9X369VQJ7NMROn8MpDFJzMAGFbcYsRFg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAFu5ZNxU_zNEdZuC1J9X369VQJ7NMROn8MpDFJzMAGFbcYsRFg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwO814B2ky66BunQ4BWvdkOpVH3iO3ch5K_DCNozwzsMzg%40mail.gmail.com.

Reply via email to