Venafi / ansible-collection-venafi

Ansible collection for managing machine identities (certificates and keys) using Venafi
Apache License 2.0
13 stars 7 forks source link

Implement Service Generated CSR #6

Closed Kerrida closed 2 years ago

Kerrida commented 2 years ago

Initial implementation of being able to run the Ansible module with a Service Generated CSR. Submitting the PR now for easier commentary from Maintainers.

Added support for the new csr_origin parameter. Check to see if the parameter was passed, if so set it to the value passed. Check if csr_origin was set to "service", if set Include_Private_Key to true. (This may be redundant based on looking in vcert-python? ) Modify _atomic_write segment to handle copying the key to a local file when retrieving the certificate.

Known TODO: Clean up pieces not needed, such as self.module.log(msg="csr_origin is: %s" % csr_origin)
Add additional checks to ensure that all parameters are compatible with the chosen origin and ensure conflicts are handled properly. Add new parameter to the documentations sections.