creating a csv file on localhost with lineinfile

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