fix: Install content on the target machine instead of the provisioning
When trying to install node_exporter on the target machines, at a certain point the binaries would start to be installed on the machine where ansible is running which is not the point when doing automation tasks. This correction will avoid the installation of the exporter on the provisioning machine and also solve this error: TASK [prometheus.prometheus.node_exporter : Download node_exporter binary to local folder] ************************ fatal: [...*]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ubuntu@localhost: Permission denied (publickey).", "unreachable": true}
Now, the binaries will be downloaded to ubuntu@targetmachine instead of ubuntu@localhost
There are reasons why it is downloaded on the provisioner and not directly on the target, it saves you from downloading the binary multiple times and it's not always that the target hosts can access the internet (although that is less of an issue after #28 got merged).
I understand why it might be appealing to be able to download the binaries directly on the target machines. But rather than changing the roles from fetching the binaries on the provisioner to fetch them on the target it would be better if it were a configurable option, so that you could choose which method you want.
With that being said, I think there might be something wrong with the setup on your provisioner, AFAIK ansible should use a local connection by default when talking to localhost and not use ssh.
#425
Docs Build 📝
This PR is closed and any previously published docsite has been unpublished.