Closed rossm-mf closed 1 month ago
Hello.
You need to install unzip
and zipinfo
Look at the docs for the unarchive
module for further info: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/unarchive_module.html#notes
I think it's important to note that those tools also have to be present on the host running Ansible, because the unarchive tasks get delegated to the localhost https://github.com/prometheus-community/ansible/blob/dc94de011ffdb079fbd6d64da0e63d2155dfb284/roles/process_exporter/tasks/install.yml#L40
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.
Using docker like this this give me an error.
I get this error
I am not sure that I need to make sure should be present to make it work. if I do
zip -v
ortar -v
...it's all present