{% for host in ansible_play_batch %}
{{hostvars[host]['ansible_hostname']}},{{hostvars[host]['ansible_distribution']}},{{hostvars[host]['ansible_distribution_version']}},{{hostvars[host][output.stdline]}}
{% endfor %}
Replace ansible_distribution with what variable you required.
Variable names pls check with setup modules 

Sent from my HONOR phone


-------- Original message --------
From: Prabhakar P <ppathicl...@gmail.com>
Date: Tue, 21 Sep, 2021, 7:48 pm
To: Ansible Project <ansible-project@googlegroups.com>
Subject: [ansible-project] Inventory report
Hi Some one help me with report wrting with template .j2

hostname,CPU,MEM,SWAP.. for multipple servers.

Thanks
Prabhakar

--
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/3151e058-b398-422b-944c-c2dfe1f77affn%40googlegroups.com.

--
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/5i2m6vddzepb5xljmg-ihbmgx-uqdvo3ta5026pmvpdr76cmg8a51it1-qkgcg-qu2eei-oy90tk-or1bw0r6bf19-eayr1r5grjxq-cp256u-f5ek878pypt5vchtnm-92rsri-x3l3ol-woe4kvsri1nj.1632234569537%40email.android.com.

Reply via email to