error ansible.module_utils.connection.ConnectionError: Socket is closed

Hi all!

I am facing an issue in my role.
I am trying to configure a mikrotik router with the “routeros_command” module.
It works just fine. But, if I do a scp from my local machine to the router and then use the “routeros_command” module, I get the error below:
ansible.module_utils.connection.ConnectionError: Socket is closed

Is there something to do about the ssh connection (reset it or anything else)?

Thank you for your feedback.

David