1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

ipa module utils: BUGFIX ipa modules Cookie problem with Loadbalanced IPA and Python3 (… (#738)

* BUGFIX ipa modules Cookie problem with Loadbalanced IPA and Python3 (#737)

* Update changelogs/fragments/738-ipa-python3.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/module_utils/ipa.py

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
David Marthy 2020-08-07 08:26:38 +02:00 committed by GitHub
parent d0879bfaf9
commit 0951833a6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- ipa_hostgroup - fix an issue with load-balanced ipa and cookie handling with Python 3 (https://github.com/ansible-collections/community.general/issues/737).

View file

@ -83,7 +83,7 @@ class IPAClient(object):
if status_code not in [200, 201, 204]: if status_code not in [200, 201, 204]:
self._fail('login', info['msg']) self._fail('login', info['msg'])
self.headers = {'Cookie': resp.info().get('Set-Cookie')} self.headers = {'Cookie': info.get('set-cookie')}
except Exception as e: except Exception as e:
self._fail('login', to_native(e)) self._fail('login', to_native(e))
if not self.headers: if not self.headers: