mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-03-26 21:33:25 +00:00
Deprecate check mode behavior of pipe modules. (#714)
This commit is contained in:
@@ -51,6 +51,16 @@ class PrivateKeyModule(object):
|
||||
self.module_backend.generate_private_key()
|
||||
privatekey_data = self.module_backend.get_private_key_data()
|
||||
self.privatekey_bytes = privatekey_data
|
||||
else:
|
||||
self.module.deprecate(
|
||||
'Check mode support for openssl_privatekey_pipe will change in community.crypto 3.0.0'
|
||||
' to behave the same as without check mode. You can get that behavior right now'
|
||||
' by adding `check_mode: false` to the openssl_privatekey_pipe task. If you think this'
|
||||
' breaks your use-case of this module, please create an issue in the'
|
||||
' community.crypto repository',
|
||||
version='3.0.0',
|
||||
collection_name='community.crypto',
|
||||
)
|
||||
self.changed = True
|
||||
elif self.module_backend.needs_conversion():
|
||||
# Convert
|
||||
@@ -58,6 +68,16 @@ class PrivateKeyModule(object):
|
||||
self.module_backend.convert_private_key()
|
||||
privatekey_data = self.module_backend.get_private_key_data()
|
||||
self.privatekey_bytes = privatekey_data
|
||||
else:
|
||||
self.module.deprecate(
|
||||
'Check mode support for openssl_privatekey_pipe will change in community.crypto 3.0.0'
|
||||
' to behave the same as without check mode. You can get that behavior right now'
|
||||
' by adding `check_mode: false` to the openssl_privatekey_pipe task. If you think this'
|
||||
' breaks your use-case of this module, please create an issue in the'
|
||||
' community.crypto repository',
|
||||
version='3.0.0',
|
||||
collection_name='community.crypto',
|
||||
)
|
||||
self.changed = True
|
||||
|
||||
def dump(self):
|
||||
|
||||
Reference in New Issue
Block a user