diff --git a/changelogs/fragments/738-ipa-python3.yml b/changelogs/fragments/738-ipa-python3.yml new file mode 100644 index 0000000000..e732837d35 --- /dev/null +++ b/changelogs/fragments/738-ipa-python3.yml @@ -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). diff --git a/plugins/module_utils/ipa.py b/plugins/module_utils/ipa.py index 6a0e7712de..9eb9f406f6 100644 --- a/plugins/module_utils/ipa.py +++ b/plugins/module_utils/ipa.py @@ -83,7 +83,7 @@ class IPAClient(object): if status_code not in [200, 201, 204]: self._fail('login', info['msg']) - self.headers = {'Cookie': resp.info().get('Set-Cookie')} + self.headers = {'Cookie': info.get('set-cookie')} except Exception as e: self._fail('login', to_native(e)) if not self.headers: