Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ansible unarchive: "Failed to find handler"

Tags:

ansible

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).

like image 669
Jean-Baptiste CHAUVIN Avatar asked Dec 12 '25 05:12

Jean-Baptiste CHAUVIN


2 Answers

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.

like image 168
techraf Avatar answered Dec 14 '25 06:12

techraf


The same message might be output even if the source file type is not a compressed file.

like image 33
김병곤 Avatar answered Dec 14 '25 05:12

김병곤