Search code examples
ansiblewinrm

Ansible: How to improve the 'win_copy' speed?


I use Ansible win_copy module to copy files from my Linux machine to my Windows server and it requires quite a lot of time (about 6 seconds an empty file).

An picure of my Ansible playbook is linked.

Does anyone know how to improve the win_copy speed? Or should I use other ways to copy files from Linux to Windows?

I tried to use a list of small tasks on each file instead of loop function but it didn't change anything.


Solution

  • Consider zipping the files thus doing only one call to win_copy if win_get_url is not practical for your usecase.