diff --git a/changelogs/fragments/62218-fix-to-entrust-api.yml b/changelogs/fragments/62218-fix-to-entrust-api.yml new file mode 100644 index 00000000000..6454f1c6d50 --- /dev/null +++ b/changelogs/fragments/62218-fix-to-entrust-api.yml @@ -0,0 +1,3 @@ +bugfixes: +- "openssl_certificate - When provider is ``entrust``, use a ``connection: keep-alive`` header for ECS API connections." +- "ecs_certificate - Always specify header ``connection: keep-alive`` for ECS API connections." diff --git a/lib/ansible/module_utils/ecs/api.py b/lib/ansible/module_utils/ecs/api.py index 17812dbb937..d89b03330bc 100644 --- a/lib/ansible/module_utils/ecs/api.py +++ b/lib/ansible/module_utils/ecs/api.py @@ -241,7 +241,10 @@ class ECSSession(object): return resource def _set_config(self, name, **kwargs): - headers = {"Content-Type": "application/json"} + headers = { + "Content-Type": "application/json", + "Connection": "keep-alive", + } self.request = Request(headers=headers, timeout=60) configurators = [self._read_config_vars]