fix: add warning when openssh-keypair has private_key_format specified with opensshbin (#512)
parent
a0d862e1f1
commit
829707fc5a
|
@ -312,6 +312,12 @@ class KeypairBackendOpensshBin(KeypairBackend):
|
||||||
def __init__(self, module):
|
def __init__(self, module):
|
||||||
super(KeypairBackendOpensshBin, self).__init__(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)
|
self.ssh_keygen = KeygenCommand(self.module)
|
||||||
|
|
||||||
def _generate_keypair(self, private_key_path):
|
def _generate_keypair(self, private_key_path):
|
||||||
|
|
Loading…
Reference in New Issue