简体   繁体   中英

how to copy between two host machine and windows server client using ansible faster?

My aim is to copy from a machine A(ubuntu) to remote server B(windows2012 server) using ansible copy command. I can ping the windows server machine and can even copy a small folder from ubunto to server but when the folder size becomes big it takes so so long to get copied and sometimes not get copied . I am using as follows:

 -name:copy file
  win_copy:
    src: '/service/test.zip'
    dest:'D:/test/test.zip'

test.zip folder is around 300 MB. So, win_copy is not solving my purpose. Could you suggest what can be good option in this case?

I've had this problem and just wrote a powershell script to download the file directly to a known location on the target. Write a powershell script to download the file . I would deploy the script to the target using win_copy or win_template (if you need to do substitutions) and then call it using win_command .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM