Closed mjaschen closed 1 month ago
It also might make sense to download the file on the target machine then, because we should be able to find the arch with ansible facts.
My suggestion for now would be to group the architectures and then have different tasks in the playbook targeting the different groups.
Yep, this is a problem that can be solved by maintaining your inventory in a peculiar way. ☝️
The wrong
nginx-prometheus-exporter
binary is installed with the nginx exporter role when the target servers run under multiple processor architectures.sample from playbook:
What happens if different target processor archictectures are involved?
The role downloads the archives for each architecture (
nginx-prometheus-exporter_1.1.0_linux_amd64.tar.gz
,nginx-prometheus-exporter_1.1.0_linux_arm64.tar.gz
etc.) and extracts them – but to the same target file (/tmp/nginx-prometheus-exporter
).The upload task picks the target file and uploads it to all servers. This means that all server get the same binary.
A possible fix could look like this:
/tmp/nginx-prometheus-exporter-amd64
,/tmp/nginx-prometheus-exporter-arm64
etc.