diff --git a/changelogs/fragments/71112-ipa-python3.yml b/changelogs/fragments/71112-ipa-python3.yml new file mode 100644 index 00000000000..c4f0fe5d532 --- /dev/null +++ b/changelogs/fragments/71112-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/ansible/issues/71110). diff --git a/lib/ansible/module_utils/ipa.py b/lib/ansible/module_utils/ipa.py index e6f959eda11..015131b7c89 100644 --- a/lib/ansible/module_utils/ipa.py +++ b/lib/ansible/module_utils/ipa.py @@ -96,7 +96,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: