I was able to figure it out.  I just had to think about it a bit more:

- name: Extract Errors
 lineinfile:
   line: "{{ item.ErrorMessage }}"
   path: "{{ error_log }}"
   insertafter: EOF
   create: yes
   state: present
 loop: "{{ csv_content.list }}"
 when: item.Host is search(ansible_hostname)


-- 
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/2ccbe263-8116-43a1-b095-f63e5216f353%40googlegroups.com.

Reply via email to