diff --git a/changelogs/fragments/49987-certificate_complete_chain-error.yml b/changelogs/fragments/49987-certificate_complete_chain-error.yml new file mode 100644 index 00000000000..07d5d72d31b --- /dev/null +++ b/changelogs/fragments/49987-certificate_complete_chain-error.yml @@ -0,0 +1,2 @@ +bugfixes: +- "certificate_complete_chain - fix behavior when invalid file is parsed while reading intermediate or root certificates." diff --git a/lib/ansible/modules/crypto/certificate_complete_chain.py b/lib/ansible/modules/crypto/certificate_complete_chain.py index 0d9222d4113..3036b708982 100644 --- a/lib/ansible/modules/crypto/certificate_complete_chain.py +++ b/lib/ansible/modules/crypto/certificate_complete_chain.py @@ -230,6 +230,7 @@ def load_PEM_list(module, path, fail_on_error=True): module.fail_json(msg=msg) else: module.warn(msg) + return [] class CertificateSet(object):