I have a ansible playbook which executes specific tasks on remote nodes and update a file on localhost (master server) using lineinfile and delegate to localhost. If the execution happens simultaneously on remote hosts, the file is getting updated for few hosts and not for others.
I think, it might be due to open file, when a task is using that file from one server, then the other server can't use it. Is there a way to fix this?
Dumping the contents to separate files and merging the file can be done as a workaround