`unarchive` fails with `Failed to find handler for "/tmp/app.tar.gz". Make sure the required command to extract the file is installed.`
IntermediateTroubleshootingModules, Idempotency and Handlers
Answer
Likely causes → The target is missing the tool needed to extract the archive (unzip for .zip, tar and gtar, zstd, xz), or the file is not a valid archive at all (an HTML error page saved as .tar.gz).
Diagnose → file /tmp/app.tar.gz and which unzip tar on the target.
Fix → Install the extractor first (package: name=unzip). Download with get_url and a checksum:, so a bad download fails before unarchive. Remember that remote_src: true is needed when the archive is already on the target.
Prevent → List archive tools in the base role, and always verify checksums of downloaded artifacts.
More on Modules, Idempotency and Handlers
`ERROR! The requested handler 'Restart nginx' was not found in either the main handlers list nor in the listening handlers list`BeginnerA handler named `restart {{ app_service }}` is never found when notified as `restart myapp`AdvancedA `command` task reports `changed` on every run, and the Molecule idempotence check failsBeginner`curl ... | tar xz` fails on the host but the `shell` task reports successIntermediate`lineinfile` appends the same line again on every runIntermediate`lineinfile` with `backrefs: true` reports `ok` but the line was never addedIntermediate