When I unarchive a file with Ansible, the following error occurred:
Failed to find handler to unarchive. Make sure the required command to extract the file is installed.
Is there a solution without installing the required modules (gtar / unzip).
No. Ansible is no magic, it is an automation tool which relies on commonly available tools to perform its tasks.
Per unarchive documentation:
requires gtar/unzip command on target host
If you look at the source, it looks for gtar (preferred) then tar and unzip.
You can always use command / shell modules to run any command you like, but still you'd need programs to extract from the archives on the target machine.
The same message might be output even if the source file type is not a compressed file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With