Do you have a playbook that isn't working or are you asking us to write this playbook? When I have challenges like this I create a sandbox playbook that tackles the individual challenge. When I get it working I copy that back into the larger playbook I am developing.
Walter -- Walter Rowe, Division Chief Infrastructure Services, OISM Mobile: 202.355.4123 On Mar 6, 2023, at 2:09 PM, Aharonu <[email protected]> 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CANGEjuWprqkT90LdW3%2BVzUfs5YD4pwDZZnmiUMFHWdkVmqzjOQ%40mail.gmail.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2FCANGEjuWprqkT90LdW3%252BVzUfs5YD4pwDZZnmiUMFHWdkVmqzjOQ%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C2d3386f4dbdf446f766c08db1e765462%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638137265831347033%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UFrrDZmqU%2FouMS8aYr5sB47dpIkkPabvfhp80qgv%2FsI%3D&reserved=0>. -- 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/127203C1-7A98-46C0-9BCF-72065591FECB%40nist.gov.
