ERROR for unarchive module with password protected file

12 views
Skip to first unread message

Sandeep Panchal

unread,
Nov 29, 2017, 4:21:48 AM11/29/17
to Ansible Project
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}




Kai Stian Olstad

unread,
Nov 29, 2017, 9:37:34 AM11/29/17
to ansible...@googlegroups.com
It's a bug fixed in a newer version of Ansible.


--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages