Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Install content on the target machine instead of the provisioning #182

Closed
wants to merge 2 commits into from

Conversation

lykholat
Copy link

@lykholat lykholat commented Aug 3, 2023

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

lykholat added 2 commits August 2, 2023 15:47
Signed-off-by: lykholat <anastasiya.lykholat@aspiretechnology.com>
Signed-off-by: lykholat <anastasiya.lykholat@aspiretechnology.com>
@gardar
Copy link
Member

gardar commented Aug 16, 2023

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.

@gardar gardar changed the title Fix: Install content on the target machine instead of the provisioning fix: Install content on the target machine instead of the provisioning Aug 16, 2023
@gardar
Copy link
Member

gardar commented Oct 17, 2024

#425

@gardar gardar closed this Oct 17, 2024
Copy link
Contributor

Docs Build 📝

This PR is closed and any previously published docsite has been unpublished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants