I have a local_action using the lineinfile module to modify a single file on Ansible control server on behalf of each host in the inventory active for the current play, using information obtained from an earlier task in the play. The problem is the task gets run in parallel for each host, and they end up stomping on each other’s changes.
Is there some way to prevent parallel execution for just one task, or to apply some sort of synchronization to the task?