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}




-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7e955c07-2b6e-40a6-bc20-fdab3998f212%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to