source archive succeeds however, downloading and unarchiving fails

Hi,

Please provide your suggestions. Kindly help me on what mistake I am doing,

`

ansible --version
ansible 2.4.3.0
config file = None
configured module search path = [u’/home/xxxxxx/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]

`

`
cat /etc/issue
Linux Mint 18.3 Sylvia \n \l

`

  1. First playbook below:

`

  • name: downloading java
    get_url:
    url: https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz
    dest: /usr/share/
    owner: root
    group: root
    mode: 0644
    register: status

  • name: unarchiving java source file
    unarchive:
    src: /usr/share/openjdk-9.0.4_linux-x64_bin.tar.gz
    dest: /usr/share/
    owner: root
    group: root
    mode: 0644
    remote_src: no
    when: status| success

  • name: changing permissions recursively
    file:
    path: /usr/share/jdk-9.0.4
    mode: 0755
    recurse: yes

`

fails with below error:

`
<127.0.0.1> (0, ‘’, ‘’)
The full traceback is:
File “/tmp/ansible_YOPdb4/ansible_module_unarchive.py”, line 141, in
from shlex import quote

fatal: [127.0.0.1]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“attributes”: null,
“backup”: null,
“content”: null,
“creates”: null,
“delimiter”: null,
“dest”: “/usr/share/”,
“directory_mode”: null,
“exclude”: ,
“extra_opts”: ,
“follow”: false,
“force”: null,
“group”: “root”,
“keep_newer”: false,
“list_files”: false,
“mode”: 420,
“original_basename”: “openjdk-9.0.4_linux-x64_bin.tar.gz”,
“owner”: “root”,
“regexp”: null,
“remote_src”: true,
“selevel”: null,
“serole”: null,
“setype”: null,
“seuser”: null,
“src”: “/usr/share/openjdk-9.0.4_linux-x64_bin.tar.gz”,
“unsafe_writes”: null,
“validate_certs”: true
}
},
“msg”: “Failed to find handler for "/usr/share/openjdk-9.0.4_linux-x64_bin.tar.gz". Make sure the required command to extract the file is installed. Commands "gtar" and "tar" not found. Command "unzip" not found.”
}
to retry, use: --limit @/home/xxxxxx/gitlab/ansb-plybooks/playbook.retry