mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 05:43:06 +00:00
fix: add warning when openssh-keypair has private_key_format specified with opensshbin (#512)
This commit is contained in:
@@ -312,6 +312,12 @@ class KeypairBackendOpensshBin(KeypairBackend):
|
||||
def __init__(self, module):
|
||||
super(KeypairBackendOpensshBin, self).__init__(module)
|
||||
|
||||
if self.module.params['private_key_format'] != 'auto':
|
||||
self.module.fail_json(
|
||||
msg="'auto' is the only valid option for " +
|
||||
"'private_key_format' when 'backend' is not 'cryptography'"
|
||||
)
|
||||
|
||||
self.ssh_keygen = KeygenCommand(self.module)
|
||||
|
||||
def _generate_keypair(self, private_key_path):
|
||||
|
||||
Reference in New Issue
Block a user