Thanks Matt.
I am trying to debug the copy module which I am using to transfer an image from linux to XP on virtualbox on the same host (for subsequent processing). I am using SSH, with ControlPersist, scp_if_ssh and pipelining turned on.
When I first copy the file, ~700KB, it takes ~3.5 secs. Subsequently, ie when the file exists in the target location, it takes ~1.2 secs.
I understand from debug logs that during the first copy operation, it does the copy. And during the overwrite operation, it doesn't as mostly MD5 checksum says so. What I don't understand is that scp of the same file, irrespective of copy or overwrite, takes < 1sec. Why does ansible take so long a time?
Any light on the functioning of the copy module is greatly appreciated. The only other method I have to overcome this induced delay is doing an scp.