I'm using ansible tower and configured to run forks = 250.
My tasks is simple, it writes in a file data extracted from hosts like 4000 hosts.
example:
- name: creating report
lineinfile: dest="reports/{{ report_name }}.csv" line="{{ inventory_hostname }},{{ item }}"
insertafter=EOF create=yes
with_items: "{{ report_result.stdout_lines | trim }}"
That works well, but recently i have noticed lines missing like 400 hosts.
There is nothing wrong with those hosts, so the only lead i have is that the module lineinfile
has its limitations while writing that many lines in a file.
I'm wondering if anybody here have or had this problem before and any alternatives. thanks!