-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fixed connection with proxmox without certs #9178
base: main
Are you sure you want to change the base?
Fixed connection with proxmox without certs #9178
Conversation
Thanks for your contribution! Can you please add a changelog fragment? Thanks. |
6f7933b
to
8cb1fb8
Compare
changelogs/fragments/9178-fix-proxmox-connection-without-certs.yml
Outdated
Show resolved
Hide resolved
@@ -312,7 +312,7 @@ def _get_json(self, url, ignore_errors=None): | |||
data = [] | |||
s = self._get_session() | |||
while True: | |||
ret = s.get(url, headers=self.headers) | |||
ret = s.get(url, headers=self.headers, verify=s.verify) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which version of requests
do you have that needs this? self._get_session()
returns a requests.Session
object with verify
set, which according to the documentation (and the requests sources) should apply to all requests made with this session. So the change should not really have any effect. If it has an effect for you, I think we should first try to find out why that is the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have requests
2.32.3 and python
3.12. I'm on mac, if it's important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works on a lxc.
On macOS Sequoia 15.1.1
: ❌
ansible --version
ansible [core 2.18.0]
config file = /Users/*user*/Desktop/*project*/ansible.cfg
configured module search path = ['/Users/*user*/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/11.0.0/libexec/lib/python3.13/site-packages/ansible
ansible collection location = /Users/*user*/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.13.0 (main, Oct 7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.4)] (/usr/local/Cellar/ansible/11.0.0/libexec/bin/python)
jinja version = 3.1.4
libyaml = True
On pipenv: ❌
ansible [core 2.18.0]
config file = /Users/*user*/Desktop/*project*/ansible.cfg
configured module search path = ['/Users/*user*/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/*user*/Desktop/*project*/lib/python3.12/site-packages/ansible
ansible collection location = /Users/*user*/.ansible/collections:/usr/share/ansible/collections
executable location = /Users/*user*/Desktop/*project*/bin/ansible
python version = 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 15.0.0 (clang-1500.3.9.4)] (/Users/*user*/Desktop/*project*/bin/python3.12)
jinja version = 3.1.4
libyaml = True
On a Debian GNU/Linux 11 (bullseye)
lxc: ✅
ansible --version
ansible [core 2.15.12]
config file = /root/*project*/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/.local/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/usr/bin/python3)
jinja version = 3.1.4
libyaml = True
Tell me what information you need
Thanks!
….yml Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
Need to add the verify argument to the get() call to successfully connect to a proxmox without a certificate.
Without it, the validate_certs parameter in proxmox.yml inventory seems to be ignored (not really used, at least).
ISSUE TYPE
COMPONENT NAME
plugins/inventory/proxmox.py