Convert yes/no to true/false. (#503)

This commit is contained in:
Felix Fontein
2022-08-23 21:33:29 +02:00
committed by GitHub
parent ed03b1aa7f
commit 0e15d6cea8
27 changed files with 121 additions and 121 deletions

View File

@@ -175,7 +175,7 @@ class PrivateKeyBackend:
return True
self.module.fail_json(msg='Unable to read the key. The key is protected with a another passphrase / no passphrase or broken.'
' Will not proceed. To force regeneration, call the module with `generate`'
' set to `full_idempotence` or `always`, or with `force=yes`.')
' set to `full_idempotence` or `always`, or with `force=true`.')
self._ensure_existing_private_key_loaded()
if self.regenerate != 'never':
if not self._check_size_and_type():
@@ -183,7 +183,7 @@ class PrivateKeyBackend:
return True
self.module.fail_json(msg='Key has wrong type and/or size.'
' Will not proceed. To force regeneration, call the module with `generate`'
' set to `partial_idempotence`, `full_idempotence` or `always`, or with `force=yes`.')
' set to `partial_idempotence`, `full_idempotence` or `always`, or with `force=true`.')
# During generation step, regenerate if format does not match and format_mismatch == 'regenerate'
if self.format_mismatch == 'regenerate' and self.regenerate != 'never':
if not self._check_format():
@@ -191,7 +191,7 @@ class PrivateKeyBackend:
return True
self.module.fail_json(msg='Key has wrong format.'
' Will not proceed. To force regeneration, call the module with `generate`'
' set to `partial_idempotence`, `full_idempotence` or `always`, or with `force=yes`.'
' set to `partial_idempotence`, `full_idempotence` or `always`, or with `force=true`.'
' To convert the key, set `format_mismatch` to `convert`.')
return False

View File

@@ -152,7 +152,7 @@ class KeypairBackend(OpensshModule):
self.module.fail_json(
msg="Unable to read the key. The key is protected with a passphrase or broken. " +
"Will not proceed. To force regeneration, call the module with `generate` " +
"set to `full_idempotence` or `always`, or with `force=yes`."
"set to `full_idempotence` or `always`, or with `force=true`."
)
@abc.abstractmethod
@@ -167,7 +167,7 @@ class KeypairBackend(OpensshModule):
self.module.fail_json(
msg="Key has wrong type and/or size. Will not proceed. " +
"To force regeneration, call the module with `generate` set to " +
"`partial_idempotence`, `full_idempotence` or `always`, or with `force=yes`."
"`partial_idempotence`, `full_idempotence` or `always`, or with `force=true`."
)
return self.original_private_key is None
elif self.regenerate in ('partial_idempotence', 'full_idempotence'):