From 75413d0b087df0368cbde6da811b18e6dc3c6795 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 2 Aug 2025 18:25:28 +0200 Subject: [PATCH] Also retry on HTTP statuses 502 and 504. (#947) --- changelogs/fragments/947-acme-retry.yml | 4 ++++ plugins/module_utils/_acme/acme.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/947-acme-retry.yml diff --git a/changelogs/fragments/947-acme-retry.yml b/changelogs/fragments/947-acme-retry.yml new file mode 100644 index 00000000..71196037 --- /dev/null +++ b/changelogs/fragments/947-acme-retry.yml @@ -0,0 +1,4 @@ +bugfixes: + - "acme_* modules - also retry on HTTP responses 502 Bad Gateway and 504 Gateway Timeout. The latter is needed for ZeroSSL, + which seems to have a lot of 504s + (https://github.com/ansible-collections/community.crypto/issues/945, https://github.com/ansible-collections/community.crypto/pull/947)." diff --git a/plugins/module_utils/_acme/acme.py b/plugins/module_utils/_acme/acme.py index 42cabd86..c8626a31 100644 --- a/plugins/module_utils/_acme/acme.py +++ b/plugins/module_utils/_acme/acme.py @@ -64,7 +64,7 @@ if t.TYPE_CHECKING: # -1 usually means connection problems -RETRY_STATUS_CODES = (-1, 408, 429, 503) +RETRY_STATUS_CODES = (-1, 408, 429, 502, 503, 504) RETRY_COUNT = 10