Module: unarchive - ansible/community GitHub Wiki

GitHub unarchive issues GitHub unarchive PRs

THIS PAGE IS OLD and no longer maintained. For questions, please use the Ansible forum.

Welcome to the unarchive module community

This space is to collaborate on the Ansible unarchive module. Feel free to add ideas or help out where you can.

The unarchive module is currently unmaintained.

Known issues

  • The module is running unzip and gtar underneath
    • We are scraping the output of both tools, which is error-prone
    • BSD does not offer an equivalent unzip version, and ships bsdtar and not gtar by default
    • Module parameters do not always offer the same functionality to both tools
    • Very sensitive with UTF-8 and other charsets, sensitive to languages (so we baiscally force en_US.UTF8)
    • Idempotency is a huge problem as we are depending on the tool's output
    • Permission/ownership changes are post-processed, outside of gtar/unzip's reach
  • The module offers download functionality
    • But everyone has different needs for downloading stuff (proxy, authentication, headers, ...)
    • Ansible has specialized functionality for downloading files (get_url, uri), we don't want unarchive to become a specialized download module of its own
    • Actually we prefer that this functionality gets deprecated altogether
  • The module only supports (compressed) archives, not compressed files
    • Historically it was designed only with archives in mind
    • Most users have no clue what an archive is, or what the difference is with compressed files
    • This means that files that are only compressed such as foo.bz2 and bar.gz are not currently supported since they are technically only compressed.
  • The user interface allows to add options/flags to unzip/gtar directly
    • This is error-prone, combinations of flags interfere with other parts of the module and may fail
    • This makes it impossible to have a pure-python drop-in replacement

Solution

  • A pure-python uncompress and compress module that supports archives and compressed files
    • Now that Python 2.4 support has been dropped, this is actually achievable
    • That supports most of the functionality of unzip and gtar natively
    • That is fully idempotent and knows when changes have been made
    • That can support selective compression/uncompression (either including or excluding files)
    • It would be able to handle ownership/permission changes much better