On 10/11/2021 18:32, Norman Gray wrote:

Greetings.

I recently raised issue <https://github.com/ansible/ansible/issues/76264>, 
connected to the behaviour of the `unarchive` module on FreeBSD.  It was closed as a 
duplicate and, in effect, not-a-bug, with the indication that any further commentary 
or discussion would be more welcome here than on the bugparade.

So...

One workaround suggested is to install gtar on the target machine, but apart 
from that requiring a further package/task, it's arguably poor FreeBSD style to 
require tools that aren't part of the install (requiring Python in order to use 
Ansible is of course a necessary breach of that).  FreeBSD (and I think the 
other BSDs as well) places something of a premium on using the tool-suite 
available in the stock install, where possible.  Because of its dependence on 
an optional package (gtar), I would therefore class the `unarchive` module as 
‘broken on stock FreeBSD’.

The alternative workaround of avoiding `unarchive`, and using the `command` 
module to untar archives, is more attractive, to the extent that it fits my 
perception of good style in this context.

I'd be interested in any thoughts.

Best wishes,

Norman


Hello Norman,

I'm more pragmatic:

- name: Install GNU tar on Alpine Linux
  package:
    name: tar
  when: ansible_os_family == 'Alpine'

- name: Install GNU tar on FreeBSD
  package:
    name: gtar
  when: ansible_os_family == 'FreeBSD'

Yes it requires an extra task, but still better IMHO than inventing workarounds 
for unarchive.

Regards
         Racke

--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5da06ccc-607f-2249-8cea-63ad984b5d8e%40linuxia.de.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to