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

pull/504/head
Felix Fontein 2022-08-23 21:33:29 +02:00 committed by GitHub
parent ed03b1aa7f
commit 0e15d6cea8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 121 additions and 121 deletions

View File

@ -34,7 +34,7 @@ The following instructions show how to set up a simple self-signed CA certificat
use_common_name_for_san: false # since we do not specify SANs, don't use CN as a SAN use_common_name_for_san: false # since we do not specify SANs, don't use CN as a SAN
basic_constraints: basic_constraints:
- 'CA:TRUE' - 'CA:TRUE'
basic_constraints_critical: yes basic_constraints_critical: true
key_usage: key_usage:
- keyCertSign - keyCertSign
key_usage_critical: true key_usage_critical: true

View File

@ -114,10 +114,10 @@ options:
validate_certs: validate_certs:
description: description:
- Whether calls to the ACME directory will validate TLS certificates. - Whether calls to the ACME directory will validate TLS certificates.
- "B(Warning:) Should B(only ever) be set to C(no) for testing purposes, - "B(Warning:) Should B(only ever) be set to C(false) for testing purposes,
for example when testing against a local Pebble server." for example when testing against a local Pebble server."
type: bool type: bool
default: yes default: true
select_crypto_backend: select_crypto_backend:
description: description:
- Determines which crypto backend to use. - Determines which crypto backend to use.

View File

@ -23,7 +23,7 @@ options:
description: description:
- Generate the certificate, even if it already exists. - Generate the certificate, even if it already exists.
type: bool type: bool
default: no default: false
csr_path: csr_path:
description: description:
@ -110,9 +110,9 @@ options:
- Include the intermediate certificate to the generated certificate - Include the intermediate certificate to the generated certificate
- This is only used by the C(acme) provider. - This is only used by the C(acme) provider.
- Note that this is only available for older versions of C(acme-tiny). - Note that this is only available for older versions of C(acme-tiny).
New versions include the chain automatically, and setting I(acme_chain) to C(yes) results in an error. New versions include the chain automatically, and setting I(acme_chain) to C(true) results in an error.
type: bool type: bool
default: no default: false
acme_directory: acme_directory:
description: description:
@ -314,7 +314,7 @@ options:
- This is only used by the C(ownca) provider. - This is only used by the C(ownca) provider.
- Note that this is only supported if the C(cryptography) backend is used! - Note that this is only supported if the C(cryptography) backend is used!
type: bool type: bool
default: yes default: true
''' '''
BACKEND_SELFSIGNED_DOCUMENTATION = r''' BACKEND_SELFSIGNED_DOCUMENTATION = r'''

View File

@ -122,10 +122,10 @@ options:
aliases: [ subjectAltName_critical ] aliases: [ subjectAltName_critical ]
use_common_name_for_san: use_common_name_for_san:
description: description:
- If set to C(yes), the module will fill the common name in for - If set to C(true), the module will fill the common name in for
C(subject_alt_name) with C(DNS:) prefix if no SAN is specified. C(subject_alt_name) with C(DNS:) prefix if no SAN is specified.
type: bool type: bool
default: yes default: true
aliases: [ useCommonNameForSAN ] aliases: [ useCommonNameForSAN ]
key_usage: key_usage:
description: description:
@ -219,7 +219,7 @@ options:
certificates or for own CAs." certificates or for own CAs."
- Note that this is only supported if the C(cryptography) backend is used! - Note that this is only supported if the C(cryptography) backend is used!
type: bool type: bool
default: no default: false
subject_key_identifier: subject_key_identifier:
description: description:
- The subject key identifier as a hex string, where two bytes are separated by colons. - The subject key identifier as a hex string, where two bytes are separated by colons.
@ -227,7 +227,7 @@ options:
- "Please note that commercial CAs ignore this value, respectively use a value of their - "Please note that commercial CAs ignore this value, respectively use a value of their
own choice. Specifying this option is mostly useful for self-signed certificates own choice. Specifying this option is mostly useful for self-signed certificates
or for own CAs." or for own CAs."
- Note that this option can only be used if I(create_subject_key_identifier) is C(no). - Note that this option can only be used if I(create_subject_key_identifier) is C(false).
- Note that this is only supported if the C(cryptography) backend is used! - Note that this is only supported if the C(cryptography) backend is used!
type: str type: str
authority_key_identifier: authority_key_identifier:

View File

@ -129,7 +129,7 @@ options:
is protected by an unknown passphrase, or when they key is not protected by a passphrase, is protected by an unknown passphrase, or when they key is not protected by a passphrase,
but a passphrase is specified. Make sure you have a B(backup) when using this option! but a passphrase is specified. Make sure you have a B(backup) when using this option!
- If set to C(always), the module will always regenerate the key. This is equivalent to - If set to C(always), the module will always regenerate the key. This is equivalent to
setting I(force) to C(yes). setting I(force) to C(true).
- Note that if I(format_mismatch) is set to C(convert) and everything matches except the - Note that if I(format_mismatch) is set to C(convert) and everything matches except the
format, the key will always be converted, except if I(regenerate) is set to C(always). format, the key will always be converted, except if I(regenerate) is set to C(always).
type: str type: str

View File

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

View File

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

View File

@ -57,7 +57,7 @@ options:
description: description:
- "Whether account creation is allowed (when state is C(present))." - "Whether account creation is allowed (when state is C(present))."
type: bool type: bool
default: yes default: true
contact: contact:
description: description:
- "A list of contact URLs." - "A list of contact URLs."
@ -74,7 +74,7 @@ options:
- "Boolean indicating whether you agree to the terms of service document." - "Boolean indicating whether you agree to the terms of service document."
- "ACME servers can require this to be true." - "ACME servers can require this to be true."
type: bool type: bool
default: no default: false
new_account_key_src: new_account_key_src:
description: description:
- "Path to a file containing the ACME account RSA or Elliptic Curve key to change to." - "Path to a file containing the ACME account RSA or Elliptic Curve key to change to."
@ -129,7 +129,7 @@ EXAMPLES = '''
community.crypto.acme_account: community.crypto.acme_account:
account_key_src: /etc/pki/cert/private/account.key account_key_src: /etc/pki/cert/private/account.key
state: present state: present
terms_agreed: yes terms_agreed: true
contact: contact:
- mailto:me@example.com - mailto:me@example.com
- mailto:myself@example.org - mailto:myself@example.org
@ -138,7 +138,7 @@ EXAMPLES = '''
community.crypto.acme_account: community.crypto.acme_account:
account_key_src: /etc/pki/cert/private/account.key account_key_src: /etc/pki/cert/private/account.key
state: present state: present
allow_creation: no allow_creation: false
contact: contact:
- mailto:me@example.com - mailto:me@example.com

View File

@ -85,7 +85,7 @@ options:
description: description:
- "The email address associated with this account." - "The email address associated with this account."
- "It will be used for certificate expiration warnings." - "It will be used for certificate expiration warnings."
- "Note that when C(modify_account) is not set to C(no) and you also - "Note that when C(modify_account) is not set to C(false) and you also
used the M(community.crypto.acme_account) module to specify more than one contact used the M(community.crypto.acme_account) module to specify more than one contact
for your account, this module will update your account and restrict for your account, this module will update your account and restrict
it to the (at most one) contact email address specified here." it to the (at most one) contact email address specified here."
@ -103,17 +103,17 @@ options:
- "ACME servers can require this to be true." - "ACME servers can require this to be true."
- This option will only be used when C(acme_version) is not 1. - This option will only be used when C(acme_version) is not 1.
type: bool type: bool
default: no default: false
modify_account: modify_account:
description: description:
- "Boolean indicating whether the module should create the account if - "Boolean indicating whether the module should create the account if
necessary, and update its contact data." necessary, and update its contact data."
- "Set to C(no) if you want to use the M(community.crypto.acme_account) module to manage - "Set to C(false) if you want to use the M(community.crypto.acme_account) module to manage
your account instead, and to avoid accidental creation of a new account your account instead, and to avoid accidental creation of a new account
using an old key if you changed the account key with M(community.crypto.acme_account)." using an old key if you changed the account key with M(community.crypto.acme_account)."
- "If set to C(no), C(terms_agreed) and C(account_email) are ignored." - "If set to C(false), C(terms_agreed) and C(account_email) are ignored."
type: bool type: bool
default: yes default: true
challenge: challenge:
description: The challenge to be performed. description: The challenge to be performed.
type: str type: str
@ -200,7 +200,7 @@ options:
without having to re-authenticate the domain. This can be a security without having to re-authenticate the domain. This can be a security
concern." concern."
type: bool type: bool
default: no default: false
force: force:
description: description:
- Enforces the execution of the challenge and validation, even if an - Enforces the execution of the challenge and validation, even if an
@ -208,15 +208,15 @@ options:
- This is especially helpful when having an updated CSR, for example with - This is especially helpful when having an updated CSR, for example with
additional domains for which a new certificate is desired. additional domains for which a new certificate is desired.
type: bool type: bool
default: no default: false
retrieve_all_alternates: retrieve_all_alternates:
description: description:
- "When set to C(yes), will retrieve all alternate trust chains offered by the ACME CA. - "When set to C(true), will retrieve all alternate trust chains offered by the ACME CA.
These will not be written to disk, but will be returned together with the main These will not be written to disk, but will be returned together with the main
chain as C(all_chains). See the documentation for the C(all_chains) return chain as C(all_chains). See the documentation for the C(all_chains) return
value for details." value for details."
type: bool type: bool
default: no default: false
select_chain: select_chain:
description: description:
- "Allows to specify criteria by which an (alternate) trust chain can be selected." - "Allows to specify criteria by which an (alternate) trust chain can be selected."
@ -351,7 +351,7 @@ EXAMPLES = r'''
# type: TXT # type: TXT
# ttl: 60 # ttl: 60
# state: present # state: present
# wait: yes # wait: true
# # Note: route53 requires TXT entries to be enclosed in quotes # # Note: route53 requires TXT entries to be enclosed in quotes
# value: "{{ sample_com_challenge.challenge_data['sample.com']['dns-01'].resource_value | regex_replace('^(.*)$', '\"\\1\"') }}" # value: "{{ sample_com_challenge.challenge_data['sample.com']['dns-01'].resource_value | regex_replace('^(.*)$', '\"\\1\"') }}"
# when: sample_com_challenge is changed and 'sample.com' in sample_com_challenge.challenge_data # when: sample_com_challenge is changed and 'sample.com' in sample_com_challenge.challenge_data
@ -364,7 +364,7 @@ EXAMPLES = r'''
# type: TXT # type: TXT
# ttl: 60 # ttl: 60
# state: present # state: present
# wait: yes # wait: true
# # Note: item.value is a list of TXT entries, and route53 # # Note: item.value is a list of TXT entries, and route53
# # requires every entry to be enclosed in quotes # # requires every entry to be enclosed in quotes
# value: "{{ item.value | map('regex_replace', '^(.*)$', '\"\\1\"' ) | list }}" # value: "{{ item.value | map('regex_replace', '^(.*)$', '\"\\1\"' ) | list }}"
@ -496,11 +496,11 @@ account_uri:
type: str type: str
all_chains: all_chains:
description: description:
- When I(retrieve_all_alternates) is set to C(yes), the module will query the ACME server - When I(retrieve_all_alternates) is set to C(true), the module will query the ACME server
for alternate chains. This return value will contain a list of all chains returned, for alternate chains. This return value will contain a list of all chains returned,
the first entry being the main chain returned by the server. the first entry being the main chain returned by the server.
- See L(Section 7.4.2 of RFC8555,https://tools.ietf.org/html/rfc8555#section-7.4.2) for details. - See L(Section 7.4.2 of RFC8555,https://tools.ietf.org/html/rfc8555#section-7.4.2) for details.
returned: when certificate was retrieved and I(retrieve_all_alternates) is set to C(yes) returned: when certificate was retrieved and I(retrieve_all_alternates) is set to C(true)
type: list type: list
elements: dict elements: dict
contains: contains:

View File

@ -45,7 +45,7 @@ options:
description: description:
- "Path to the certificate to revoke." - "Path to the certificate to revoke."
type: path type: path
required: yes required: true
account_key_src: account_key_src:
description: description:
- "Path to a file containing the ACME account RSA or Elliptic Curve - "Path to a file containing the ACME account RSA or Elliptic Curve

View File

@ -33,7 +33,7 @@ options:
description: description:
- "The challenge type." - "The challenge type."
type: str type: str
required: yes required: true
choices: choices:
- tls-alpn-01 - tls-alpn-01
challenge_data: challenge_data:
@ -41,7 +41,7 @@ options:
- "The C(challenge_data) entry provided by M(community.crypto.acme_certificate) for the - "The C(challenge_data) entry provided by M(community.crypto.acme_certificate) for the
challenge." challenge."
type: dict type: dict
required: yes required: true
private_key_src: private_key_src:
description: description:
- "Path to a file containing the private key file to use for this challenge - "Path to a file containing the private key file to use for this challenge

View File

@ -76,7 +76,7 @@ options:
- "If I(method) is C(post) or C(get), make the module fail in case an ACME - "If I(method) is C(post) or C(get), make the module fail in case an ACME
error is returned." error is returned."
type: bool type: bool
default: yes default: true
''' '''
EXAMPLES = r''' EXAMPLES = r'''

View File

@ -32,7 +32,7 @@ options:
- A concatenated set of certificates in PEM format forming a chain. - A concatenated set of certificates in PEM format forming a chain.
- The module will try to complete this chain. - The module will try to complete this chain.
type: str type: str
required: yes required: true
root_certificates: root_certificates:
description: description:
- "A list of filenames or directories." - "A list of filenames or directories."
@ -45,7 +45,7 @@ options:
- "Symbolic links will be followed." - "Symbolic links will be followed."
type: list type: list
elements: path elements: path
required: yes required: true
intermediate_certificates: intermediate_certificates:
description: description:
- "A list of filenames or directories." - "A list of filenames or directories."

View File

@ -109,7 +109,7 @@ options:
community.crypto 1.4.0. For older versions, trying to remove community.crypto 1.4.0. For older versions, trying to remove
a key which no longer exists results in an error." a key which no longer exists results in an error."
- "NOTE that to remove the last key from a LUKS container, the - "NOTE that to remove the last key from a LUKS container, the
I(force_remove_last_key) option must be set to C(yes)." I(force_remove_last_key) option must be set to C(true)."
- "BEWARE that working with keyfiles in plaintext is dangerous. - "BEWARE that working with keyfiles in plaintext is dangerous.
Make sure that they are protected." Make sure that they are protected."
type: path type: path
@ -122,16 +122,16 @@ options:
a passphrase which no longer exists results in an error." a passphrase which no longer exists results in an error."
- "NOTE that to remove the last keyslot from a LUKS - "NOTE that to remove the last keyslot from a LUKS
container, the I(force_remove_last_key) option must be set container, the I(force_remove_last_key) option must be set
to C(yes)." to C(true)."
type: str type: str
version_added: '1.0.0' version_added: '1.0.0'
force_remove_last_key: force_remove_last_key:
description: description:
- "If set to C(yes), allows removing the last key from a container." - "If set to C(true), allows removing the last key from a container."
- "BEWARE that when the last key has been removed from a container, - "BEWARE that when the last key has been removed from a container,
the container can no longer be opened!" the container can no longer be opened!"
type: bool type: bool
default: no default: false
label: label:
description: description:
- "This option allow the user to create a LUKS2 format container - "This option allow the user to create a LUKS2 format container
@ -665,7 +665,7 @@ class CryptHandler(Handler):
if keyslot_count < 2: if keyslot_count < 2:
self._module.fail_json(msg="LUKS device %s has less than two active keyslots. " self._module.fail_json(msg="LUKS device %s has less than two active keyslots. "
"To be able to remove a key, please set " "To be able to remove a key, please set "
"`force_remove_last_key` to `yes`." % device) "`force_remove_last_key` to `true`." % device)
args = [self._cryptsetup_bin, 'luksRemoveKey', device, '-q'] args = [self._cryptsetup_bin, 'luksRemoveKey', device, '-q']
if keyfile: if keyfile:

View File

@ -107,7 +107,7 @@ options:
is protected by an unknown passphrase, or when they key is not protected by a passphrase, is protected by an unknown passphrase, or when they key is not protected by a passphrase,
but a passphrase is specified. Make sure you have a B(backup) when using this option! but a passphrase is specified. Make sure you have a B(backup) when using this option!
- If set to C(always), the module will always regenerate the key. This is equivalent to - If set to C(always), the module will always regenerate the key. This is equivalent to
setting I(force) to C(yes). setting I(force) to C(true).
- Note that adjusting the comment and the permissions can be changed without regeneration. - Note that adjusting the comment and the permissions can be changed without regeneration.
Therefore, even for C(never), the task can result in changed. Therefore, even for C(never), the task can result in changed.
type: str type: str
@ -121,7 +121,7 @@ options:
version_added: '1.0.0' version_added: '1.0.0'
notes: notes:
- In case the ssh key is broken or password protected, the module will fail. - In case the ssh key is broken or password protected, the module will fail.
Set the I(force) option to C(yes) if you want to regenerate the keypair. Set the I(force) option to C(true) if you want to regenerate the keypair.
- Supports C(check_mode). - Supports C(check_mode).
- In the case a custom C(mode), C(group), C(owner), or other file attribute is provided it will be applied to both key files. - In the case a custom C(mode), C(group), C(owner), or other file attribute is provided it will be applied to both key files.

View File

@ -32,7 +32,7 @@ options:
description: description:
- Should the certificate signing request be forced regenerated by this ansible module. - Should the certificate signing request be forced regenerated by this ansible module.
type: bool type: bool
default: no default: false
path: path:
description: description:
- The name of the file into which the generated OpenSSL certificate signing request will be written. - The name of the file into which the generated OpenSSL certificate signing request will be written.
@ -43,12 +43,12 @@ options:
- Create a backup file including a timestamp so you can get the original - Create a backup file including a timestamp so you can get the original
CSR back if you overwrote it with a new one by accident. CSR back if you overwrote it with a new one by accident.
type: bool type: bool
default: no default: false
return_content: return_content:
description: description:
- If set to C(yes), will return the (current or generated) CSR's content as I(csr). - If set to C(true), will return the (current or generated) CSR's content as I(csr).
type: bool type: bool
default: no default: false
version_added: "1.0.0" version_added: "1.0.0"
privatekey_content: privatekey_content:
version_added: "1.0.0" version_added: "1.0.0"
@ -114,7 +114,7 @@ EXAMPLES = r'''
community.crypto.openssl_csr: community.crypto.openssl_csr:
path: /etc/ssl/csr/www.ansible.com.csr path: /etc/ssl/csr/www.ansible.com.csr
privatekey_path: /etc/ssl/private/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem
force: yes force: true
common_name: www.ansible.com common_name: www.ansible.com
- name: Generate an OpenSSL Certificate Signing Request with special key usages - name: Generate an OpenSSL Certificate Signing Request with special key usages
@ -133,7 +133,7 @@ EXAMPLES = r'''
path: /etc/ssl/csr/www.ansible.com.csr path: /etc/ssl/csr/www.ansible.com.csr
privatekey_path: /etc/ssl/private/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem
common_name: www.ansible.com common_name: www.ansible.com
ocsp_must_staple: yes ocsp_must_staple: true
- name: Generate an OpenSSL Certificate Signing Request for WinRM Certificate authentication - name: Generate an OpenSSL Certificate Signing Request for WinRM Certificate authentication
community.crypto.openssl_csr: community.crypto.openssl_csr:
@ -225,12 +225,12 @@ name_constraints_excluded:
version_added: 1.1.0 version_added: 1.1.0
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/www.ansible.com.csr.2019-03-09@11:22~ sample: /path/to/www.ansible.com.csr.2019-03-09@11:22~
csr: csr:
description: The (current or generated) CSR's content. description: The (current or generated) CSR's content.
returned: if I(state) is C(present) and I(return_content) is C(yes) returned: if I(state) is C(present) and I(return_content) is C(true)
type: str type: str
version_added: "1.0.0" version_added: "1.0.0"
''' '''

View File

@ -74,7 +74,7 @@ RETURN = r'''
signature_valid: signature_valid:
description: description:
- Whether the CSR's signature is valid. - Whether the CSR's signature is valid.
- In case the check returns C(no), the module will fail. - In case the check returns C(false), the module will fail.
returned: success returned: success
type: bool type: bool
basic_constraints: basic_constraints:
@ -140,7 +140,7 @@ subject_alt_name_critical:
returned: success returned: success
type: bool type: bool
ocsp_must_staple: ocsp_must_staple:
description: C(yes) if the OCSP Must Staple extension is present, C(none) otherwise. description: C(true) if the OCSP Must Staple extension is present, C(none) otherwise.
returned: success returned: success
type: bool type: bool
ocsp_must_staple_critical: ocsp_must_staple_critical:

View File

@ -44,7 +44,7 @@ options:
description: description:
- Should the parameters be regenerated even it it already exists. - Should the parameters be regenerated even it it already exists.
type: bool type: bool
default: no default: false
path: path:
description: description:
- Name of the file in which the generated parameters will be saved. - Name of the file in which the generated parameters will be saved.
@ -55,7 +55,7 @@ options:
- Create a backup file including a timestamp so you can get the original - Create a backup file including a timestamp so you can get the original
DH params back if you overwrote them with new ones by accident. DH params back if you overwrote them with new ones by accident.
type: bool type: bool
default: no default: false
select_crypto_backend: select_crypto_backend:
description: description:
- Determines which crypto backend to use. - Determines which crypto backend to use.
@ -68,9 +68,9 @@ options:
version_added: "1.0.0" version_added: "1.0.0"
return_content: return_content:
description: description:
- If set to C(yes), will return the (current or generated) DH parameter's content as I(dhparams). - If set to C(true), will return the (current or generated) DH parameter's content as I(dhparams).
type: bool type: bool
default: no default: false
version_added: "1.0.0" version_added: "1.0.0"
notes: notes:
- Supports C(check_mode). - Supports C(check_mode).
@ -97,7 +97,7 @@ EXAMPLES = r'''
- name: Force regenerate an DH parameters if they already exist - name: Force regenerate an DH parameters if they already exist
community.crypto.openssl_dhparam: community.crypto.openssl_dhparam:
path: /etc/ssl/dhparams.pem path: /etc/ssl/dhparams.pem
force: yes force: true
''' '''
RETURN = r''' RETURN = r'''
@ -113,12 +113,12 @@ filename:
sample: /etc/ssl/dhparams.pem sample: /etc/ssl/dhparams.pem
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/dhparams.pem.2019-03-09@11:22~ sample: /path/to/dhparams.pem.2019-03-09@11:22~
dhparams: dhparams:
description: The (current or generated) DH params' content. description: The (current or generated) DH params' content.
returned: if I(state) is C(present) and I(return_content) is C(yes) returned: if I(state) is C(present) and I(return_content) is C(true)
type: str type: str
version_added: "1.0.0" version_added: "1.0.0"
''' '''

View File

@ -56,7 +56,7 @@ options:
description: description:
- Should the file be regenerated even if it already exists. - Should the file be regenerated even if it already exists.
type: bool type: bool
default: no default: false
friendly_name: friendly_name:
description: description:
- Specifies the friendly name for the certificate and private key. - Specifies the friendly name for the certificate and private key.
@ -117,12 +117,12 @@ options:
- Create a backup file including a timestamp so you can get the original - Create a backup file including a timestamp so you can get the original
output file back if you overwrote it with a new one by accident. output file back if you overwrote it with a new one by accident.
type: bool type: bool
default: no default: false
return_content: return_content:
description: description:
- If set to C(yes), will return the (current or generated) PKCS#12's content as I(pkcs12). - If set to C(true), will return the (current or generated) PKCS#12's content as I(pkcs12).
type: bool type: bool
default: no default: false
version_added: "1.0.0" version_added: "1.0.0"
select_crypto_backend: select_crypto_backend:
description: description:
@ -203,7 +203,7 @@ EXAMPLES = r'''
other_certificates: /opt/certs/ca.pem other_certificates: /opt/certs/ca.pem
state: present state: present
mode: '0600' mode: '0600'
force: yes force: true
- name: Dump/Parse PKCS#12 file - name: Dump/Parse PKCS#12 file
community.crypto.openssl_pkcs12: community.crypto.openssl_pkcs12:
@ -231,12 +231,12 @@ privatekey:
sample: /etc/ssl/private/ansible.com.pem sample: /etc/ssl/private/ansible.com.pem
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/ansible.com.pem.2019-03-09@11:22~ sample: /path/to/ansible.com.pem.2019-03-09@11:22~
pkcs12: pkcs12:
description: The (current or generated) PKCS#12's content Base64 encoded. description: The (current or generated) PKCS#12's content Base64 encoded.
returned: if I(state) is C(present) and I(return_content) is C(yes) returned: if I(state) is C(present) and I(return_content) is C(true)
type: str type: str
version_added: "1.0.0" version_added: "1.0.0"
''' '''

View File

@ -30,7 +30,7 @@ options:
description: description:
- Should the key be regenerated even if it already exists. - Should the key be regenerated even if it already exists.
type: bool type: bool
default: no default: false
path: path:
description: description:
- Name of the file in which the generated TLS/SSL private key will be written. It will have C(0600) mode - Name of the file in which the generated TLS/SSL private key will be written. It will have C(0600) mode
@ -46,16 +46,16 @@ options:
- Create a backup file including a timestamp so you can get - Create a backup file including a timestamp so you can get
the original private key back if you overwrote it with a new one by accident. the original private key back if you overwrote it with a new one by accident.
type: bool type: bool
default: no default: false
return_content: return_content:
description: description:
- If set to C(yes), will return the (current or generated) private key's content as I(privatekey). - If set to C(true), will return the (current or generated) private key's content as I(privatekey).
- Note that especially if the private key is not encrypted, you have to make sure that the returned - Note that especially if the private key is not encrypted, you have to make sure that the returned
value is treated appropriately and not accidentally written to logs etc.! Use with care! value is treated appropriately and not accidentally written to logs etc.! Use with care!
- Use Ansible's I(no_log) task option to avoid the output being shown. See also - Use Ansible's I(no_log) task option to avoid the output being shown. See also
U(https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-keep-secret-data-in-my-playbook). U(https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-keep-secret-data-in-my-playbook).
type: bool type: bool
default: no default: false
version_added: '1.0.0' version_added: '1.0.0'
regenerate: regenerate:
version_added: '1.0.0' version_added: '1.0.0'
@ -86,7 +86,7 @@ EXAMPLES = r'''
- name: Force regenerate an OpenSSL private key if it already exists - name: Force regenerate an OpenSSL private key if it already exists
community.crypto.openssl_privatekey: community.crypto.openssl_privatekey:
path: /etc/ssl/private/ansible.com.pem path: /etc/ssl/private/ansible.com.pem
force: yes force: true
- name: Generate an OpenSSL private key with a different algorithm (DSA) - name: Generate an OpenSSL private key with a different algorithm (DSA)
community.crypto.openssl_privatekey: community.crypto.openssl_privatekey:
@ -129,14 +129,14 @@ fingerprint:
sha512: "fd:ed:5e:39:48:5f:9f:fe:7f:25:06:3f:79:08:cd:ee:a5:e7:b3:3d:13:82:87:1f:84:e1:f5:c7:28:77:53:94:86:56:38:69:f0:d9:35:22:01:1e:a6:60:...:0f:9b" sha512: "fd:ed:5e:39:48:5f:9f:fe:7f:25:06:3f:79:08:cd:ee:a5:e7:b3:3d:13:82:87:1f:84:e1:f5:c7:28:77:53:94:86:56:38:69:f0:d9:35:22:01:1e:a6:60:...:0f:9b"
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/privatekey.pem.2019-03-09@11:22~ sample: /path/to/privatekey.pem.2019-03-09@11:22~
privatekey: privatekey:
description: description:
- The (current or generated) private key's content. - The (current or generated) private key's content.
- Will be Base64-encoded if the key is in raw format. - Will be Base64-encoded if the key is in raw format.
returned: if I(state) is C(present) and I(return_content) is C(yes) returned: if I(state) is C(present) and I(return_content) is C(true)
type: str type: str
version_added: '1.0.0' version_added: '1.0.0'
''' '''

View File

@ -50,7 +50,7 @@ EXAMPLES = r'''
RETURN = r''' RETURN = r'''
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/privatekey.pem.2019-03-09@11:22~ sample: /path/to/privatekey.pem.2019-03-09@11:22~
''' '''

View File

@ -44,11 +44,11 @@ options:
return_private_key_data: return_private_key_data:
description: description:
- Whether to return private key data. - Whether to return private key data.
- Only set this to C(yes) when you want private information about this key to - Only set this to C(true) when you want private information about this key to
leave the remote machine. leave the remote machine.
- "B(WARNING:) you have to make sure that private key data is not accidentally logged!" - "B(WARNING:) you have to make sure that private key data is not accidentally logged!"
type: bool type: bool
default: no default: false
check_consistency: check_consistency:
description: description:
- Whether to check consistency of the private key. - Whether to check consistency of the private key.
@ -104,9 +104,9 @@ can_parse_key:
type: bool type: bool
key_is_consistent: key_is_consistent:
description: description:
- Whether the key is consistent. Can also return C(none) next to C(yes) and - Whether the key is consistent. Can also return C(none) next to C(true) and
C(no), to indicate that consistency could not be checked. C(false), to indicate that consistency could not be checked.
- In case the check returns C(no), the module will fail. - In case the check returns C(false), the module will fail.
returned: when I(check_consistency=true) returned: when I(check_consistency=true)
type: bool type: bool
public_key: public_key:
@ -194,7 +194,7 @@ public_data:
private_data: private_data:
description: description:
- Private key data. Depends on key type. - Private key data. Depends on key type.
returned: success and when I(return_private_key_data) is set to C(yes) returned: success and when I(return_private_key_data) is set to C(true)
type: dict type: dict
''' '''

View File

@ -34,7 +34,7 @@ options:
description: description:
- Should the key be regenerated even it it already exists. - Should the key be regenerated even it it already exists.
type: bool type: bool
default: no default: false
format: format:
description: description:
- The format of the public key. - The format of the public key.
@ -68,7 +68,7 @@ options:
- Create a backup file including a timestamp so you can get the original - Create a backup file including a timestamp so you can get the original
public key back if you overwrote it with a different one by accident. public key back if you overwrote it with a different one by accident.
type: bool type: bool
default: no default: false
select_crypto_backend: select_crypto_backend:
description: description:
- Determines which crypto backend to use. - Determines which crypto backend to use.
@ -79,9 +79,9 @@ options:
choices: [ auto, cryptography ] choices: [ auto, cryptography ]
return_content: return_content:
description: description:
- If set to C(yes), will return the (current or generated) public key's content as I(publickey). - If set to C(true), will return the (current or generated) public key's content as I(publickey).
type: bool type: bool
default: no default: false
version_added: '1.0.0' version_added: '1.0.0'
extends_documentation_fragment: extends_documentation_fragment:
- files - files
@ -123,7 +123,7 @@ EXAMPLES = r'''
community.crypto.openssl_publickey: community.crypto.openssl_publickey:
path: /etc/ssl/public/ansible.com.pem path: /etc/ssl/public/ansible.com.pem
privatekey_path: /etc/ssl/private/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem
force: yes force: true
- name: Remove an OpenSSL public key - name: Remove an OpenSSL public key
community.crypto.openssl_publickey: community.crypto.openssl_publickey:
@ -163,12 +163,12 @@ fingerprint:
sha512: "fd:ed:5e:39:48:5f:9f:fe:7f:25:06:3f:79:08:cd:ee:a5:e7:b3:3d:13:82:87:1f:84:e1:f5:c7:28:77:53:94:86:56:38:69:f0:d9:35:22:01:1e:a6:60:...:0f:9b" sha512: "fd:ed:5e:39:48:5f:9f:fe:7f:25:06:3f:79:08:cd:ee:a5:e7:b3:3d:13:82:87:1f:84:e1:f5:c7:28:77:53:94:86:56:38:69:f0:d9:35:22:01:1e:a6:60:...:0f:9b"
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/publickey.pem.2019-03-09@11:22~ sample: /path/to/publickey.pem.2019-03-09@11:22~
publickey: publickey:
description: The (current or generated) public key's content. description: The (current or generated) public key's content.
returned: if I(state) is C(present) and I(return_content) is C(yes) returned: if I(state) is C(present) and I(return_content) is C(true)
type: str type: str
version_added: '1.0.0' version_added: '1.0.0'
''' '''

View File

@ -59,9 +59,9 @@ options:
return_content: return_content:
description: description:
- If set to C(yes), will return the (current or generated) certificate's content as I(certificate). - If set to C(true), will return the (current or generated) certificate's content as I(certificate).
type: bool type: bool
default: no default: false
version_added: '1.0.0' version_added: '1.0.0'
backup: backup:
@ -69,7 +69,7 @@ options:
- Create a backup file including a timestamp so you can get the original - Create a backup file including a timestamp so you can get the original
certificate back if you overwrote it with a new one by accident. certificate back if you overwrote it with a new one by accident.
type: bool type: bool
default: no default: false
csr_content: csr_content:
version_added: '1.0.0' version_added: '1.0.0'
@ -128,7 +128,7 @@ EXAMPLES = r'''
provider: acme provider: acme
acme_accountkey_path: /etc/ssl/private/ansible.com.pem acme_accountkey_path: /etc/ssl/private/ansible.com.pem
acme_challenge_path: /etc/ssl/challenges/ansible.com/ acme_challenge_path: /etc/ssl/challenges/ansible.com/
force: yes force: true
- name: Generate an Entrust certificate via the Entrust Certificate Services (ECS) API - name: Generate an Entrust certificate via the Entrust Certificate Services (ECS) API
community.crypto.x509_certificate: community.crypto.x509_certificate:
@ -216,12 +216,12 @@ filename:
sample: /etc/ssl/crt/www.ansible.com.crt sample: /etc/ssl/crt/www.ansible.com.crt
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/www.ansible.com.crt.2019-03-09@11:22~ sample: /path/to/www.ansible.com.crt.2019-03-09@11:22~
certificate: certificate:
description: The (current or generated) certificate's content. description: The (current or generated) certificate's content.
returned: if I(state) is C(present) and I(return_content) is C(yes) returned: if I(state) is C(present) and I(return_content) is C(true)
type: str type: str
version_added: '1.0.0' version_added: '1.0.0'
''' '''

View File

@ -184,7 +184,7 @@ subject_alt_name_critical:
returned: success returned: success
type: bool type: bool
ocsp_must_staple: ocsp_must_staple:
description: C(yes) if the OCSP Must Staple extension is present, C(none) otherwise. description: C(true) if the OCSP Must Staple extension is present, C(none) otherwise.
returned: success returned: success
type: bool type: bool
ocsp_must_staple_critical: ocsp_must_staple_critical:

View File

@ -38,7 +38,7 @@ options:
- If set to C(update), makes sure that the CRL contains the revoked certificates from - If set to C(update), makes sure that the CRL contains the revoked certificates from
I(revoked_certificates), but can also contain other revoked certificates. If the CRL file I(revoked_certificates), but can also contain other revoked certificates. If the CRL file
already exists, all entries from the existing CRL will also be included in the new CRL. already exists, all entries from the existing CRL will also be included in the new CRL.
When using C(update), you might be interested in setting I(ignore_timestamps) to C(yes). When using C(update), you might be interested in setting I(ignore_timestamps) to C(true).
type: str type: str
default: generate default: generate
choices: [ generate, update ] choices: [ generate, update ]
@ -47,20 +47,20 @@ options:
description: description:
- Should the CRL be forced to be regenerated. - Should the CRL be forced to be regenerated.
type: bool type: bool
default: no default: false
backup: backup:
description: description:
- Create a backup file including a timestamp so you can get the original - Create a backup file including a timestamp so you can get the original
CRL back if you overwrote it with a new one by accident. CRL back if you overwrote it with a new one by accident.
type: bool type: bool
default: no default: false
path: path:
description: description:
- Remote absolute path where the generated CRL file should be created or is already located. - Remote absolute path where the generated CRL file should be created or is already located.
type: path type: path
required: yes required: true
format: format:
description: description:
@ -117,7 +117,7 @@ options:
- Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer - Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer
+ C([w | d | h | m | s]) (for example C(+32w1d2h)). + C([w | d | h | m | s]) (for example C(+32w1d2h)).
- Note that if using relative time this module is NOT idempotent, except when - Note that if using relative time this module is NOT idempotent, except when
I(ignore_timestamps) is set to C(yes). I(ignore_timestamps) is set to C(true).
type: str type: str
default: "+0s" default: "+0s"
@ -130,7 +130,7 @@ options:
- Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer - Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer
+ C([w | d | h | m | s]) (for example C(+32w1d2h)). + C([w | d | h | m | s]) (for example C(+32w1d2h)).
- Note that if using relative time this module is NOT idempotent, except when - Note that if using relative time this module is NOT idempotent, except when
I(ignore_timestamps) is set to C(yes). I(ignore_timestamps) is set to C(true).
- Required if I(state) is C(present). - Required if I(state) is C(present).
type: str type: str
@ -175,7 +175,7 @@ options:
- Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer - Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer
+ C([w | d | h | m | s]) (for example C(+32w1d2h)). + C([w | d | h | m | s]) (for example C(+32w1d2h)).
- Note that if using relative time this module is NOT idempotent, except when - Note that if using relative time this module is NOT idempotent, except when
I(ignore_timestamps) is set to C(yes). I(ignore_timestamps) is set to C(true).
type: str type: str
default: "+0s" default: "+0s"
issuer: issuer:
@ -188,7 +188,7 @@ options:
description: description:
- Whether the certificate issuer extension should be critical. - Whether the certificate issuer extension should be critical.
type: bool type: bool
default: no default: false
reason: reason:
description: description:
- The value for the revocation reason extension. - The value for the revocation reason extension.
@ -208,7 +208,7 @@ options:
description: description:
- Whether the revocation reason extension should be critical. - Whether the revocation reason extension should be critical.
type: bool type: bool
default: no default: false
invalidity_date: invalidity_date:
description: description:
- The point in time it was known/suspected that the private key was compromised - The point in time it was known/suspected that the private key was compromised
@ -218,13 +218,13 @@ options:
- Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer - Valid format is C([+-]timespec | ASN.1 TIME) where timespec can be an integer
+ C([w | d | h | m | s]) (for example C(+32w1d2h)). + C([w | d | h | m | s]) (for example C(+32w1d2h)).
- Note that if using relative time this module is NOT idempotent. This will NOT - Note that if using relative time this module is NOT idempotent. This will NOT
change when I(ignore_timestamps) is set to C(yes). change when I(ignore_timestamps) is set to C(true).
type: str type: str
invalidity_date_critical: invalidity_date_critical:
description: description:
- Whether the invalidity date extension should be critical. - Whether the invalidity date extension should be critical.
type: bool type: bool
default: no default: false
ignore_timestamps: ignore_timestamps:
description: description:
@ -233,13 +233,13 @@ options:
I(invalidity_date) in I(revoked_certificates) will never be ignored. I(invalidity_date) in I(revoked_certificates) will never be ignored.
- Use this in combination with relative timestamps for these values to get idempotency. - Use this in combination with relative timestamps for these values to get idempotency.
type: bool type: bool
default: no default: false
return_content: return_content:
description: description:
- If set to C(yes), will return the (current or generated) CRL's content as I(crl). - If set to C(true), will return the (current or generated) CRL's content as I(crl).
type: bool type: bool
default: no default: false
extends_documentation_fragment: extends_documentation_fragment:
- files - files
@ -281,7 +281,7 @@ filename:
sample: /path/to/my-ca.crl sample: /path/to/my-ca.crl
backup_file: backup_file:
description: Name of backup file created. description: Name of backup file created.
returned: changed and if I(backup) is C(yes) returned: changed and if I(backup) is C(true)
type: str type: str
sample: /path/to/my-ca.crl.2019-03-09@11:22~ sample: /path/to/my-ca.crl.2019-03-09@11:22~
privatekey: privatekey:
@ -348,7 +348,7 @@ revoked_certificates:
issuer_critical: issuer_critical:
description: Whether the certificate issuer extension is critical. description: Whether the certificate issuer extension is critical.
type: bool type: bool
sample: no sample: false
reason: reason:
description: description:
- The value for the revocation reason extension. - The value for the revocation reason extension.
@ -360,7 +360,7 @@ revoked_certificates:
reason_critical: reason_critical:
description: Whether the revocation reason extension is critical. description: Whether the revocation reason extension is critical.
type: bool type: bool
sample: no sample: false
invalidity_date: invalidity_date:
description: | description: |
The point in time it was known/suspected that the private key was compromised The point in time it was known/suspected that the private key was compromised
@ -370,13 +370,13 @@ revoked_certificates:
invalidity_date_critical: invalidity_date_critical:
description: Whether the invalidity date extension is critical. description: Whether the invalidity date extension is critical.
type: bool type: bool
sample: no sample: false
crl: crl:
description: description:
- The (current or generated) CRL's content. - The (current or generated) CRL's content.
- Will be the CRL itself if I(format) is C(pem), and Base64 of the - Will be the CRL itself if I(format) is C(pem), and Base64 of the
CRL if I(format) is C(der). CRL if I(format) is C(der).
returned: if I(state) is C(present) and I(return_content) is C(yes) returned: if I(state) is C(present) and I(return_content) is C(true)
type: str type: str
''' '''

View File

@ -129,7 +129,7 @@ revoked_certificates:
issuer_critical: issuer_critical:
description: Whether the certificate issuer extension is critical. description: Whether the certificate issuer extension is critical.
type: bool type: bool
sample: no sample: false
reason: reason:
description: description:
- The value for the revocation reason extension. - The value for the revocation reason extension.
@ -141,7 +141,7 @@ revoked_certificates:
reason_critical: reason_critical:
description: Whether the revocation reason extension is critical. description: Whether the revocation reason extension is critical.
type: bool type: bool
sample: no sample: false
invalidity_date: invalidity_date:
description: | description: |
The point in time it was known/suspected that the private key was compromised The point in time it was known/suspected that the private key was compromised
@ -151,7 +151,7 @@ revoked_certificates:
invalidity_date_critical: invalidity_date_critical:
description: Whether the invalidity date extension is critical. description: Whether the invalidity date extension is critical.
type: bool type: bool
sample: no sample: false
''' '''