[ansible-project] Re: unzip to unarchive

2020-09-02 Thread Nuno Costa
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 


On Monday, 31 August 2020 at 22:48:31 UTC+1 lpesc...@google.com wrote:

> Bump - anyone?
>
> On Friday, August 28, 2020 at 9:42:13 AM UTC-7 lpesc...@google.com wrote:
>
>> I'm also curious about how the -o and -d switches in the original 
>> playbook relate to the new.
>>
>> On Friday, August 28, 2020 at 9:41:24 AM UTC-7 lpesc...@google.com wrote:
>>
>>> 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:
>>>
>>> - name: unpack-protos-bin
>>>   unarchive:
>>> src: file.zip
>>> dest: /usr/local/bin/protoc
>>>   notify:
>>> - unpack-proto-includes
>>>
>>> - name: unpack-proto-includes
>>>   unarchive:
>>> src: 
>>> https://github.com/google/protobuf/releases/download/v3.4.0/file.zip
>>> dest: /usr/local/include/*
>>>
>>> Can anyone tell me if I am correct, and if not, how to resolve?
>>>
>>>
>>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/923b3d11-ce53-4317-82c4-db47d48fd179n%40googlegroups.com.


[ansible-project] Re: unzip to unarchive

2020-08-31 Thread 'lpesc...@google.com' via Ansible Project
Bump - anyone?

On Friday, August 28, 2020 at 9:42:13 AM UTC-7 lpesc...@google.com wrote:

> I'm also curious about how the -o and -d switches in the original playbook 
> relate to the new.
>
> On Friday, August 28, 2020 at 9:41:24 AM UTC-7 lpesc...@google.com wrote:
>
>> 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:
>>
>> - name: unpack-protos-bin
>>   unarchive:
>> src: file.zip
>> dest: /usr/local/bin/protoc
>>   notify:
>> - unpack-proto-includes
>>
>> - name: unpack-proto-includes
>>   unarchive:
>> src: 
>> https://github.com/google/protobuf/releases/download/v3.4.0/file.zip
>> dest: /usr/local/include/*
>>
>> Can anyone tell me if I am correct, and if not, how to resolve?
>>
>>
>>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ba5a0d3b-fa7f-433b-bbe9-c141b7b4231en%40googlegroups.com.


[ansible-project] Re: unzip to unarchive

2020-08-28 Thread 'lpesc...@google.com' via Ansible Project
I'm also curious about how the -o and -d switches in the original playbook 
relate to the new.

On Friday, August 28, 2020 at 9:41:24 AM UTC-7 lpesc...@google.com wrote:

> 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:
>
> - name: unpack-protos-bin
>   unarchive:
> src: file.zip
> dest: /usr/local/bin/protoc
>   notify:
> - unpack-proto-includes
>
> - name: unpack-proto-includes
>   unarchive:
> src: 
> https://github.com/google/protobuf/releases/download/v3.4.0/file.zip
> dest: /usr/local/include/*
>
> Can anyone tell me if I am correct, and if not, how to resolve?
>
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8f5adca6-ecaf-4b49-82cf-029a8066edcbn%40googlegroups.com.