Connection Connection are reused if the task has a loop. lib/ansible/executor/task_executor.py -> self._connection = self._get_connection(variables=variables, templar=templar)