Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Add Support for over proxy installation #147

Closed
matanbaruch opened this issue Mar 23, 2020 · 2 comments
Closed

Add Support for over proxy installation #147

matanbaruch opened this issue Mar 23, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@matanbaruch
Copy link

matanbaruch commented Mar 23, 2020

What happened?
Cannot fetch binaries over proxy

How to reproduce it (as minimally and precisely as possible):
We would like to export a proxy to the machine and use that proxy
export https_proxy=https://proxy-server:8080; ansible-playbook -i hosts playbook.yml

Environment

Linux

  • Ansible version information:

ansible 2.8.0

  • Ansible playbook execution Logs:
fatal: [host01]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'url'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Failed lookup url for https://github.com/prometheus/node_exporter/releases/download/v0.18.1/sha256sums.txt : <urlopen error [Errno 111] Connection refused>"}

Anything else we need to know?:
Please add

validate_certs: False

In here
https://github.com/cloudalchemy/ansible-node-exporter/blob/master/tasks/preflight.yml#L78
https://github.com/cloudalchemy/ansible-node-exporter/blob/master/tasks/install.yml#L23

Same as
https://github.com/cloudalchemy/ansible-node-exporter/blob/master/tasks/preflight.yml#L58

@matanbaruch matanbaruch added the bug Something isn't working label Mar 23, 2020
@paulfantom
Copy link
Member

validate_certs: False reduces security of any installation and shouldn't be made a default setting. We follow "secure-by-default" policy and try to make a good example. But thanks for finding one case where we did something wrong 👍

For proxied environments, you should distribute valid certificates and either have a CA server or add CA bundle to every host so the cert is trusted.


Closing as this won't be implemented
PR #148 fixes one case of validate_certs: false which was left out for unknown reason.

@mickaeltr
Copy link

Hello,
We're hitting the same problem with a Squid proxy.
Would that be an option to add a flag to disable certificate validation, to workaround this: ansible/ansible#32750 ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants