node_expoter issues
i use Redhart ,have an erreur when i install node_expoter. TASK [sacem.prometheus._common : Unpack binary archive node_exporter-1.9.0.linux-amd64.tar.gz] *** fatal: [anamig-i-01.xxx.com r -> localhost]: FAILED! => {"changed": false, "msg": "Failed to find handler for "/root/.ansible/tmp/ansible-tmp-1740153430.4443488-159-32544251314034/source". Make sure the required command to extract the file is installed.\nCommand "/bin/tar" detected as tar type None. GNU tar required.\nCommand "/usr/bin/unzip" could not handle archive: unzip: short read\n\nUnable to find required 'zipinfo' binary in the path."}
Are you deploying from mac os? In that case you are probably missing gnu-tar as documented here: https://github.com/prometheus-community/ansible/tree/main/roles/node_exporter#requirements
i use this image: docker.io/willhallonline/ansible:2.15-alpine-3.16
In that case you might need to install tar as the tar in busybox is not compatible:
Hello, ran into this as well with a self baked ansible image derived from alpine.
This doesn't have to do with the lack of unzip and zipinfo - this has to do with the version of tar in the image. It's a busybox variant because your image (willhallonline/ansible:latest) is derived from alpine linux.
You can check the module for unarchive ; it bails out if not GNU tar or bsdtar. When you "docker container run -it willhallonline/ansible:latest tar --version", you are likely seeing "tar (busybox) 1.36.1", which won't match. You can "apk add tar" as a build step and it should work after then as it will replace the busybox variant default.
Originally posted by @neutralalice in #369