diff --git a/changelogs/fragments/scaleway-getheaders.yaml b/changelogs/fragments/scaleway-getheaders.yaml new file mode 100644 index 0000000000..fb43a13b8f --- /dev/null +++ b/changelogs/fragments/scaleway-getheaders.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: +- scaleway inventory plugin - Fix response.getheaders regression (https://github.com/ansible/ansible/pull/48671) diff --git a/lib/ansible/plugins/inventory/scaleway.py b/lib/ansible/plugins/inventory/scaleway.py index 6eecd0538b..8fc62b9db0 100644 --- a/lib/ansible/plugins/inventory/scaleway.py +++ b/lib/ansible/plugins/inventory/scaleway.py @@ -113,7 +113,7 @@ def _fetch_information(token, url): except KeyError: raise AnsibleError("Incorrect format from the Scaleway API response") - link = response.getheader('Link') + link = response.headers['Link'] if not link: return results relations = parse_pagination_link(link)