Ansible Module unarchive

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

- name: "Install IntelliJ Plugin"
  unarchive:
    src: "{{ansible_env.SOME_DIR}}/some-other-dir/some-file.zip"
    dest: "{{ some_path }}"
  when: (intellij_version == intellij.version|string) and (builder == 'gradle') and intellij_plugin_dir.stat.exists and not some_dir.stat.exists

Listing the Content

It seems it extracts the content even if I want to list it:

- name: List the content of an archive
  unarchive:
    src: /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home/lib/src.zip
    dest: /tmp
    list_files: true
  register: unarchive_result