Thanks Walter.

May I still ask a favor for CVS data structure atleast for any of one
condion here so I can refer and work on remaining? Once I got flow it helps
to explore more. Thanking you.

The header must be:  cluster_name,log_cluster,vol_name,status,work_status

not working:
(it has to give here when status=online and  work_status=not_used )
exclude:
(it has go give here when status=offline and  vol_name=<name contacts
'Test'>)
working:
(it has to give here when status=online and work_status=used
[other then not working & exclude list] )



On Tue, 7 Mar 2023, 01:13 Aharonu, <aharon...@gmail.com> wrote:

> Hi Walter,
>
> Getting for the day!
>
> Actually I have data stored in 'csv' as mentioned below it is received
> from some other task and stories in 'csv' variable.
>
> I wanted to created CVS file from that data with required data structure I
> requested. Could you please help me with this to achieve my requirement?
> Thank you
>
> On Tue, 7 Mar 2023, 00:39 Aharonu, <aharon...@gmail.com> wrote:
>
>> Hi All,
>>
>> Could anyone please help for storing data into CSV file from
>> variable with required structure ? Thank you
>>
>> I have csv variable data from other set_fact as mentioned below
>>
>> "csv": [
>>         "cluster1,virtual_clu1,log_vol1,online,used",
>>         "cluster1,virtual_clu1,log_vol2,offline,not_used",
>>         "cluster1,virtual_clu1,log_vol3_Test,online,not_used",
>>         "cluster1,virtual_clu1,log_vol4,offline,not_used",
>>         "cluster2,virtual_clu2,log_vol6,online,used",
>>         "cluster2,virtual_clu2,log_vol1,offline,not_used",
>>         "cluster2,virtual_clu2,log_vol3,online,not_used"
>>         "cluster2,virtual_clu2,log_vol4,online,used"
>>     ]
>>
>> *Looking for:*
>> The header must be:  cluster_name,log_cluster,vol_name,status,work_status
>>
>> not working:
>> (it has to give here when status=online and  work_status=not_used )
>> exclude:
>> (it has go give here when status=offline and  vol_name=<name contacts
>> 'Test'>)
>> working:
>> (it has to give here when status=online and work_status=used
>> [other then not working & exclude list] )
>>
>> *example: file1.csv*
>>
>> not working:
>> cluster_name,log_cluster,vol_name,status,work_status
>> cluster2,virtual_clu2,log_vol3,online,not_used
>>
>> exclude:
>> cluster_name,log_cluster,vol_name,status,work_status
>> cluster1,virtual_clu1,log_vol3_Test,online,not_used
>> cluster1,virtual_clu1,log_vol2,offline,not_used
>> cluster1,virtual_clu1,log_vol4,offline,not_used
>> cluster2,virtual_clu2,log_vol1,offline,not_used
>>
>> working:
>> cluster_name,log_cluster,vol_name,status,work_status
>> cluster1,virtual_clu1,log_vol1,online,used
>> cluster2,virtual_clu2,log_vol6,online,used
>> cluster2,virtual_clu2,log_vol4,online,used
>>
>>
>>
>>
>>
>>
>>
>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CANGEjuUjv761HrBWPatHrFCqrCt7-cRLtSda0eA2%3D7o26-Rjtw%40mail.gmail.com.

Reply via email to