unzip to unarchive

Hi all,
I want to change this to unarchive:

  • name: unpack-protos-bin
    shell: unzip -o /root/.ansible-management/file.zip -d /usr/local bin/protoc
    args:
    executable: /bin/bash
    notify:

  • unpack-proto-includes

  • name: unpack-proto-includes
    shell: unzip -o /root/.ansible-management/file.zip -d /usr/local include/*
    args:
    executable: /bin/bash

This is what I have surmounted, but not sure if it’s correct:

Can anyone tell me if I am correct, and if not, how to resolve?

I’m also curious about how the -o and -d switches in the original playbook relate to the new.

Bump - anyone?

I’m using something like below but I had to add ignore_errors*: yes* due to what I believe is a bug in ansible and/or unarchive module.
The task always fail but the files are extracted.

Got this workaround from https://github.com/ansible/ansible/issues/27081#issuecomment-595842668

  • name: Unzip core plugins from war file
    unarchive:
    remote_src: true
    src: “/home/user/gerrit-war/gerrit-3.2.3.war”
    extra_opts:

  • -j

  • “/home/user/gerrit-war/gerrit-3.2.3.war”

  • “WEB-INF/plugins/{{ item }}.jar”
    dest: “/home/user”
    loop:

  • replication

  • gitiles
    ignore_errors: yes