I want to install (an older version of) Eclipse on some Windows 7 hosts with Ansible. My playbook installs Java and downloads the needed zip file, but win_unzip does not extract the file.

- name: Ensure Eclipse Luna RCP is extracted
    src: '%TEMP%\eclipse-rcp-luna-SR2-win32.zip'
    dest: '%userprofile%\Programs\eclipse_luna'
  tags: eclipse

When the task is executed, I can see that a powershell process is running on the Windows host and is consuming some CPU. After some time I get the following result by Ansible:

TASK [Ensure Eclipse Luna RCP is extracted] ************
ok: [] => {"changed": false,
                       "dest": "C:\\Users\\testuser\\Programs\\eclipse_luna",
                       "removed": false,
                       "src": "C:\\Users\\testuser\\AppData\\Local\\Temp\\eclipse-rcp-luna-SR2-win32.zip"

The result is a bit strange because the win_zip documentation states:

This module is not really idempotent, it will extract the archive every time, and report a change.

Due to this I expect a changed and not an ok. Nevertheless the folder C:\Users\testuser\Programs\eclipse_luna was created but is empty.


After posting this question, I tried to extract the zip file myself and realized that the file was faulty.

After deleting the file and rerunning the playbook, win_unzip worked as expected.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .