ipaserver/library/ipaserver_setup_ca.py: Fix bug introduced with ca-less PR

The ca-less PR introduced a bug when http_ca_cert is not set. The test
for loading the certificate is testing for None, but the string will only
be empty in this case.

Related: #298 (Install server and replicas without CA)
This commit is contained in:
Thomas Woerner
2020-06-15 09:48:02 +02:00
parent 3487efcf9f
commit 6b2b9ea787

View File

@@ -265,7 +265,7 @@ def main():
# additional
options.domainlevel = ansible_module.params.get('domainlevel')
options._http_ca_cert = ansible_module.params.get('_http_ca_cert')
if options._http_ca_cert is not None:
if options._http_ca_cert:
options._http_ca_cert = decode_certificate(options._http_ca_cert)
# init #################################################################