ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
764 stars 1.42k forks source link

Add support for ssl_keyfile & ssl_certfile to redis modules #8295

Open Obeyed opened 2 weeks ago

Obeyed commented 2 weeks ago

Summary

I have a Redis server with custom SSL key and cert files as well as a self-signed CA. It would be useful to be able to pass the ssl_keyfile and ssl_certfile options to the Redis client.

Similar to the existing ca_certs Ansible module argument (_ssl_ca_certs in Redis_).

I wasn't able to figure out if it is already possible to pass a custom keyfile and certfile to the Ansible modules. I'm assuming the below code is the relevant place to add this: https://github.com/ansible-collections/community.general/blob/main/plugins/module_utils/redis.py#L77

Did I miss something, or is it indeed not possible to sepcify the key and certfiles?

Issue Type

Feature Idea

Component Name

redis, redis_data, redis_data_info, redis_data_incr, redis_info

Additional Information

No response

Code of Conduct

ansibullbot commented 2 weeks ago

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 2 weeks ago

cc @levonet @paginabianca @slok click here for bot help

felixfontein commented 2 weeks ago

I wasn't able to figure out if it is already possible to pass a custom keyfile and certfile to the Ansible modules. I'm assuming the below code is the relevant place to add this: https://github.com/ansible-collections/community.general/blob/main/plugins/module_utils/redis.py#L77

Yes, that, https://github.com/ansible-collections/community.general/blob/main/plugins/module_utils/redis.py#L46, and plugins/doc_fragments/redis.py for the documentation.

For option names, these should be called client_cert and client_key (both of type path), as these are the common names for such options.