Hi Racke,

I parsed the cisco command "show interface status" and  converted to json , 
now I want to convert it to csv. 

    - name: Write interfaces_status_facts to 
'/var/lib/awx/projects/test-sk/show_interfaces_status_facts-[inventory_hostname].json'
      copy:
        content: "{{ interfaces_status_facts | to_nice_json }}"       
        dest: "/var/lib/awx/projects/test-sk/interfaces_status_facts-{{ 
inventory_hostname }}.json"





On Wednesday, November 20, 2019 at 4:40:51 PM UTC+5:30, Stefan Hornburg 
(Racke) wrote:
>
> On 11/20/19 11:30 AM, rajthecomputerguy wrote: 
> > Hi Team, 
> > 
> > Anybody knows how to convert json to csv in ansible? 
> > 
> > Thanks, 
> > Pushparaj 
> > 
>
> What's your use case? I suppose you know you can't convert JSON with a 
> nested structure to CSV? 
>
> Regards 
>         Racke 
>
> > -- 
> > 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] <javascript:> <mailto:
> [email protected] <javascript:>>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/6f4a23c6-12ae-4736-abd3-972df733ce6e%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/ansible-project/6f4a23c6-12ae-4736-abd3-972df733ce6e%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
>
>
> -- 
> Ecommerce and Linux consulting + Perl and web application programming. 
> Debian and Sympa administration. Provisioning with Ansible. 
>
>

-- 
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/aee026d0-a792-464b-be95-c46426c81d88%40googlegroups.com.

Reply via email to