简体   繁体   中英

Ansible win_unzip Module takes far to long

At our customer the Ansible module win_unzip takes for to long when executed. Our code is:

  - name: unzip zip package into C:\server\dlls 
    win_unzip:
      src: "{{app_path}}\\app_dll.zip"
      dest: "{{app_path}}\\dlls"
      rm: true

This step takes more than 10 minutes. The zip file is copied with win_copy in the direct step before, code is here:

  - name: copy zip package to C:\server
    win_copy:
      src: "path2zip.zip"
      dest: "{{app_path}}\\app_dll.zip"

The extraction successfully finishes, but it blocks our Pipeline for more than 10 minutes, which isn´t acceptable.

We reduced the time needed to unzip the package with the help of the Powershell Module Expand-Archive to nearly zero. Here is the code:

  - name: name: unzip zip package into C:\server\dlls 
    win_shell: "Expand-Archive {{app_path}}\\app_dll.zip -DestinationPath {{app_path}}\\dlls"

Our pipeline is now fast again, but it would be nice to have a fast Ansible win_unzip Module!

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