Open joecaruso opened 7 months ago
@joecaruso hey sorry no one got back to this earlier. I'll have the team look in to this as this looks like a bug. The variable is set to be a list of strings but looking at the code it look like it being used as a string
Story (DEVOPS-7087) is open for this
Summary
When using the na_ontap_security_certificates module, if you have two (or more) intermediate certificates as a list of strings and pass them to the intermediate_certificates parameter, the call will fail. The REST API expects a string, so the certificates need to be concatenated together into a single string with a \n in between the certs. Once this is done, the module works as expected. Currently the docs for the module says the intermediate_certificates supports a list of strings. Either the docs should be updated, with info about how to handle if there multiple certificates. Or ideally, the module should handle this automatically and format the strings correctly before sending it to the API.
https://docs.netapp.com/us-en/ontap-restapi-9121/ontap/swagger-ui/index.html#/security/security_certificate_create https://docs.ansible.com/ansible/devel/collections/netapp/ontap/na_ontap_security_certificates_module.html#parameter-intermediate_certificates
Component Name
na_ontap_security_certificates
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
Module should handle multiple intermediate certificates passed as a list of strings.
Actual Results