I have a tasks that writes information gathered from remotes to a csv file on localhost
====================================================================
- name: write result to output.csv
delegate_to: localhost
lineinfile:
dest: "./temp/{{ ansible_play_name }}.csv"
line: >
{{ ansible_fqdn }};{{ ansible_eth0.ipv4.address }};{{ ansible_distribution }} {{ ansible_distribution_version }};{{ ansible_play_name }};{{ pg_encoding.stdout }}
insertafter: EOF
====================================================================
now ... the ansible_play_name is i.e. POSTGRES_get_utf8.
How can I only get POSTGRES to be written out to the csv. I guess 'split' being part of the solution, but how exactly?