cp-ansible
cp-ansible copied to clipboard
Get the CA certificate after self-signed install
Describe the issue
When using auto-generated (by cp-anisble) self-signed certificates, i.e., setting ssl_enabled: True
without any other SSL properties, one would naturally want to get ahold of the generated CA certificate, so that it can be added to the truststore for clients, for example.
However, I can't see portable way to do this. The CA cert does get copied back to generated_ssl_files
somewhere on the ansible controller, which seems to be relative to the location of the cp-ansible playbook install location, but this location is unpredicable since it depends on how the user installed the collection, how they have configured ansible galaxy, etc.
I tried to modify ssl_self_signed_ca_cert_filepath
to put it in a location of my choosing the but the install fails if this is set to anything other than generated_ssl_files/<filename>
(there are places that assume the path to the CA will still be the default location, it is only possible to change the filename, not any other path elements).
Is there a recommended approach to getting the CA certificate after a self-signed install?
Environment (please complete the following information):
- CP-Ansible Branch: 7.6