# ERROR for unarchive module with password protected file

**URL:** <https://forum.ansible.com/t/error-for-unarchive-module-with-password-protected-file/26164>\
**Category:** Ansible Project\
**Created:** [November 29, 2017, 9:21am UTC](https://forum.ansible.com/t/error-for-unarchive-module-with-password-protected-file/26164 "2017-11-29T09:21:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Panchal1](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Sandeep\_Panchal1](https://forum.ansible.com/u/Sandeep_Panchal1)\
**Post date:** [November 29, 2017, 9:21am UTC](https://forum.ansible.com/t/error-for-unarchive-module-with-password-protected-file/26164/1 "2017-11-29T09:21:48Z")

</div>

Hi All,

i am trying to use unarchive module to extract a password protected zip file, using extra\_opts option but unable to achieve it.

Is it really supported by unarchive module or not ?

below is snippet what i tried,

- name: unarchive files  
unarchive:  
extra\_opts:
- -P
- redhat123  
src: password-protected.zip  
dest: /tmp/nopassword/

below is error snippet,

FAILED! =\> {“changed”: false, “dest”: “/tmp/nopassword/”, “extract\_results”: {“cmd”: [“/bin/unzip”, “-o”, “/home/centos/.ansible/tmp/ansible-tmp-1511947211.39-27333658763341/source”, “-P”, “XXXXXXX”, “-d”, “/tmp/nopassword/”], “err”: “caution: filename not matched: -P\ncaution: filename not matched: lex123\n”, “out”: “Archive: /home/centos/.ansible/tmp/ansible-tmp-1511947211.39-27333658763341/source\n”, “rc”: 11}, “failed”: true, “gid”: 0, “group”: “root”, “handler”: “ZipArchive”, “mode”: “0755”, “msg”: “failed to unpack /home/centos/.ansible/tmp/ansible-tmp-1511947211.39-27333658763341/source to /tmp/nopassword/”, “owner”: “root”, “size”: 6, “src”: “/home/centos/.ansible/tmp/ansible-tmp-1511947211.39-27333658763341/source”, “state”: “directory”, “uid”: 0}

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 29, 2017, 2:37pm UTC](https://forum.ansible.com/t/error-for-unarchive-module-with-password-protected-file/26164/2 "2017-11-29T14:37:19Z")

</div>

It's a bug fixed in a newer version of Ansible.
