3

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
  win_unzip:
    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: [192.168.1.87] => {"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.

1 Answer 1

3

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.

You must log in to answer this question.

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