mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 13:53:06 +00:00
Get rid of backend parameter whenever possible (#883)
* Get rid of backend parameter whenever possible. * Always auto-detect if backend choices are 'cryptography' and 'auto', resp. always check cryptography version. * Improve error message. * Update documentation.
This commit is contained in:
@@ -36,6 +36,9 @@ options:
|
||||
- Determines which crypto backend to use.
|
||||
- The default choice is V(auto), which tries to use C(cryptography) if available.
|
||||
- If set to V(cryptography), will try to use the L(cryptography,https://cryptography.io/) library.
|
||||
- Note that with community.crypto 3.0.0, all values behave the same.
|
||||
This option will be deprecated in a later version.
|
||||
We recommend to not set it explicitly.
|
||||
type: str
|
||||
default: auto
|
||||
choices: [auto, cryptography]
|
||||
@@ -191,9 +194,7 @@ def main():
|
||||
msg=f"Error while reading public key file from disk: {e}", **result
|
||||
)
|
||||
|
||||
backend, module_backend = select_backend(
|
||||
module, module.params["select_crypto_backend"], data
|
||||
)
|
||||
module_backend = select_backend(module, data)
|
||||
|
||||
try:
|
||||
result.update(module_backend.get_info())
|
||||
|
||||
Reference in New Issue
Block a user