# creating a csv file on localhost with lineinfile

**URL:** <https://forum.ansible.com/t/creating-a-csv-file-on-localhost-with-lineinfile/37311>\
**Category:** Ansible Project\
**Created:** [November 7, 2022, 1:07pm UTC](https://forum.ansible.com/t/creating-a-csv-file-on-localhost-with-lineinfile/37311 "2022-11-07T13:07:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dulhaver](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dulhaver/32/1061_2.png) [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Post date:** [November 7, 2022, 1:07pm UTC](https://forum.ansible.com/t/creating-a-csv-file-on-localhost-with-lineinfile/37311/1 "2022-11-07T13:07:12Z")

</div>

I want to create a csv with 3 values per host

the FQDN of the host, a string "postgres" and the stdout of a vairable I have defined

here is my playbook which I am testing againt 3 hosts which all have running postgres, so I expect/aim at 3 lines
