HenryGP / om_ansible

Minimalistic, disposable Ops Manager environment with Ansible
19 stars 17 forks source link

"Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters" in OM #90

Closed kalungng closed 2 years ago

kalungng commented 2 years ago

When initiating OM with OM_ansible, it hits an error:

TASK [Generate an OpenSSL certificate for clients signed with om_ansible CA] *****************
failed: [localhost] (item=n1) => {"ansible_loop_var": "item", "changed": false, "item": "n1", "msg": "Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate?"}
failed: [localhost] (item=n2) => {"ansible_loop_var": "item", "changed": false, "item": "n2", "msg": "Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate?"}
failed: [localhost] (item=n3) => {"ansible_loop_var": "item", "changed": false, "item": "n3", "msg": "Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate?"}
failed: [localhost] (item=omserver) => {"ansible_loop_var": "item", "changed": false, "item": "omserver", "msg": "Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate?"}
failed: [localhost] (item=kmip) => {"ansible_loop_var": "item", "changed": false, "item": "kmip", "msg": "Valid PEM but no BEGIN CERTIFICATE/END CERTIFICATE delimiters. Are you sure this is a certificate?"}

After checking with @HenryGP and testing, the issue is resolved when swapping the order of the private key and the first cert in files/ssl/ca.pem. Please swap the order in the github repository for long-term fix.

HenryGP commented 2 years ago

This has been resolved in PR #91