<linkrel="prev"title="community.crypto.openssl_csr_info module – Provide information of OpenSSL Certificate Signing Requests (CSR)"href="openssl_csr_info_module.html"/><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
</head>
<bodyclass="wy-body-for-nav"><!-- extra body elements for Ansible beyond RTD Sphinx Theme -->
<liclass="toctree-l1"><aclass="reference internal"href="docsite/guide_selfsigned.html">How to create self-signed certificates</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="docsite/guide_ownca.html">How to create a small CA</a></li>
</ul>
<ulclass="current">
<liclass="toctree-l1"><aclass="reference internal"href="acme_account_module.html">community.crypto.acme_account module – Create, modify or delete ACME accounts</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="acme_account_info_module.html">community.crypto.acme_account_info module – Retrieves information on ACME accounts</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="acme_certificate_module.html">community.crypto.acme_certificate module – Create SSL/TLS certificates with the ACME protocol</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="acme_certificate_revoke_module.html">community.crypto.acme_certificate_revoke module – Revoke certificates with the ACME protocol</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="acme_challenge_cert_helper_module.html">community.crypto.acme_challenge_cert_helper module – Prepare certificates required for ACME challenges such as <codeclass="docutils literal notranslate"><spanclass="pre">tls-alpn-01</span></code></a></li>
<liclass="toctree-l1"><aclass="reference internal"href="acme_inspect_module.html">community.crypto.acme_inspect module – Send direct requests to an ACME server</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="certificate_complete_chain_module.html">community.crypto.certificate_complete_chain module – Complete certificate chain given a set of untrusted and root certificates</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="ecs_certificate_module.html">community.crypto.ecs_certificate module – Request SSL/TLS certificates with the Entrust Certificate Services (ECS) API</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="ecs_domain_module.html">community.crypto.ecs_domain module – Request validation of a domain with the Entrust Certificate Services (ECS) API</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="get_certificate_module.html">community.crypto.get_certificate module – Get a certificate from a host:port</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssh_cert_module.html">community.crypto.openssh_cert module – Generate OpenSSH host or user certificates.</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssh_keypair_module.html">community.crypto.openssh_keypair module – Generate OpenSSH private and public keys</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_csr_info_module.html">community.crypto.openssl_csr_info module – Provide information of OpenSSL Certificate Signing Requests (CSR)</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_privatekey_info_module.html">community.crypto.openssl_privatekey_info module – Provide information for OpenSSL private keys</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_privatekey_pipe_module.html">community.crypto.openssl_privatekey_pipe module – Generate OpenSSL private keys without disk access</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_publickey_module.html">community.crypto.openssl_publickey module – Generate an OpenSSL public key from its private key.</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_publickey_info_module.html">community.crypto.openssl_publickey_info module – Provide information for OpenSSL public keys</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_signature_module.html">community.crypto.openssl_signature module – Sign data with openssl</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_signature_info_module.html">community.crypto.openssl_signature_info module – Verify signatures with openssl</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="x509_certificate_info_module.html">community.crypto.x509_certificate_info module – Provide information of OpenSSL X.509 certificates</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_privatekey_info_filter.html">community.crypto.openssl_privatekey_info filter – Retrieve information from OpenSSL private keys</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_publickey_info_filter.html">community.crypto.openssl_publickey_info filter – Retrieve information from OpenSSL public keys in PEM format</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="x509_certificate_info_filter.html">community.crypto.x509_certificate_info filter – Retrieve information from X.509 certificates in PEM format</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="x509_crl_info_filter.html">community.crypto.x509_crl_info filter – Retrieve information from X.509 CRLs in PEM format</a></li>
<ahref="https://github.com/ansible-collections/community.crypto/edit/main/plugins/modules/openssl_csr_pipe.py?description=%23%23%23%23%23%20SUMMARY%0A%3C!—%20Your%20description%20here%20–%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr"class="fa fa-github"> Edit on GitHub</a>
<p>This module is part of the <aclass="reference external"href="https://galaxy.ansible.com/community/crypto">community.crypto collection</a> (version 2.10.0).</p>
You need further requirements to be able to use this module,
see <aclass="reference internal"href="#ansible-collections-community-crypto-openssl-csr-pipe-module-requirements"><spanclass="std std-ref">Requirements</span></a> for details.</p>
<p>To use it in a playbook, specify: <codeclass="code docutils literal notranslate"><spanclass="pre">community.crypto.openssl_csr_pipe</span></code>.</p>
</div>
<pclass="ansible-version-added">New in community.crypto 1.3.0</p>
<h2><aclass="toc-backref"href="#id1">Synopsis</a><aclass="headerlink"href="#synopsis"title="Permalink to this heading"></a></h2>
<ulclass="simple">
<li><p>Please note that the module regenerates an existing CSR if it does not match the module’s options, or if it seems to be corrupt.</p></li>
<li><p>This module allows one to (re)generate OpenSSL certificate signing requests.</p></li>
<li><p>This module supports the subjectAltName, keyUsage, extendedKeyUsage, basicConstraints and OCSP Must Staple extensions.</p></li>
</ul>
</section>
<sectionid="requirements">
<spanid="ansible-collections-community-crypto-openssl-csr-pipe-module-requirements"></span><h2><aclass="toc-backref"href="#id2">Requirements</a><aclass="headerlink"href="#requirements"title="Permalink to this heading"></a></h2>
<p>The below requirements are needed on the host that executes this module.</p>
<ulclass="simple">
<li><p>cryptography >= 1.3</p></li>
</ul>
</section>
<sectionid="parameters">
<h2><aclass="toc-backref"href="#id3">Parameters</a><aclass="headerlink"href="#parameters"title="Permalink to this heading"></a></h2>
<aclass="ansibleOptionLink"href="#parameter-authority_cert_issuer"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Names that will be present in the authority cert issuer field of the certificate signing request.</p>
<p>Values must be prefixed by their options. (i.e., <codeclass="docutils literal notranslate"><spanclass="pre">email</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">URI</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">DNS</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">RID</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">IP</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">dirName</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">otherName</span></code> and the ones specific to your CA)</p>
<p>If specified, <em>authority_cert_serial_number</em> must also be specified.</p>
<p>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 or for own CAs.</p>
<p>Note that this is only supported if the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> backend is used!</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">AuthorityKeyIdentifier</span></code> extension will only be added if at least one of <em>authority_key_identifier</em>, <em>authority_cert_issuer</em> and <em>authority_cert_serial_number</em> is specified.</p>
<aclass="ansibleOptionLink"href="#parameter-authority_cert_serial_number"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">integer</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The authority cert serial number.</p>
<p>If specified, <em>authority_cert_issuer</em> must also be specified.</p>
<p>Note that this is only supported if the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> backend is used!</p>
<p>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 or for own CAs.</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">AuthorityKeyIdentifier</span></code> extension will only be added if at least one of <em>authority_key_identifier</em>, <em>authority_cert_issuer</em> and <em>authority_cert_serial_number</em> is specified.</p>
<aclass="ansibleOptionLink"href="#parameter-authority_key_identifier"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The authority key identifier as a hex string, where two bytes are separated by colons.</p>
<p>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 or for own CAs.</p>
<p>Note that this is only supported if the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> backend is used!</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">AuthorityKeyIdentifier</span></code> extension will only be added if at least one of <em>authority_key_identifier</em>, <em>authority_cert_issuer</em> and <em>authority_cert_serial_number</em> is specified.</p>
<aclass="ansibleOptionLink"href="#parameter-basic_constraints"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: basicConstraints</span></p>
<aclass="ansibleOptionLink"href="#parameter-basic_constraints_critical"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: basicConstraints_critical</span></p>
<aclass="ansibleOptionLink"href="#parameter-common_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: CN, commonName</span></p>
<aclass="ansibleOptionLink"href="#parameter-content"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
<aclass="ansibleOptionLink"href="#parameter-country_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: C, countryName</span></p>
<aclass="ansibleOptionLink"href="#parameter-create_subject_key_identifier"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">boolean</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Create the Subject Key Identifier from the public key.</p>
<p>Please note that commercial CAs can ignore the value, respectively use a value of their own choice instead. Specifying this option is mostly useful for self-signed certificates or for own CAs.</p>
<p>Note that this is only supported if the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> backend is used!</p>
<aclass="ansibleOptionLink"href="#parameter-crl_distribution_points"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=dictionary</span></p>
<p><spanclass="ansible-option-versionadded">added in community.crypto 1.4.0</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Allows to specify one or multiple CRL distribution points.</p>
<p>Only supported by the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> backend.</p>
<aclass="ansibleOptionLink"href="#parameter-crl_distribution_points/crl_issuer"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-indent-desc"></div><divclass="ansible-option-cell"><p>Information about the issuer of the CRL.</p>
<aclass="ansibleOptionLink"href="#parameter-crl_distribution_points/full_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-indent-desc"></div><divclass="ansible-option-cell"><p>Describes how the CRL can be retrieved.</p>
<p>Mutually exclusive with <em>relative_name</em>.</p>
<aclass="ansibleOptionLink"href="#parameter-crl_distribution_points/reasons"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-indent-desc"></div><divclass="ansible-option-cell"><p>List of reasons that this distribution point can be used for when performing revocation checks.</p>
<aclass="ansibleOptionLink"href="#parameter-crl_distribution_points/relative_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-indent-desc"></div><divclass="ansible-option-cell"><p>Describes how the CRL can be retrieved relative to the CRL issuer.</p>
<p>Mutually exclusive with <em>full_name</em>.</p>
<aclass="ansibleOptionLink"href="#parameter-digest"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The digest used when signing the certificate signing request with the private key.</p>
<aclass="ansibleOptionLink"href="#parameter-email_address"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: E, emailAddress</span></p>
<aclass="ansibleOptionLink"href="#parameter-extended_key_usage"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: extKeyUsage, extendedKeyUsage</span></p>
<td><divclass="ansible-option-cell"><p>Additional restrictions (for example client authentication, server authentication) on the allowed purposes for which the public key may be used.</p>
<aclass="ansibleOptionLink"href="#parameter-extended_key_usage_critical"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: extKeyUsage_critical, extendedKeyUsage_critical</span></p>
<aclass="ansibleOptionLink"href="#parameter-key_usage"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: keyUsage</span></p>
<td><divclass="ansible-option-cell"><p>This defines the purpose (for example encipherment, signature, certificate signing) of the key contained in the certificate.</p>
<aclass="ansibleOptionLink"href="#parameter-key_usage_critical"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: keyUsage_critical</span></p>
<aclass="ansibleOptionLink"href="#parameter-locality_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: L, localityName</span></p>
<aclass="ansibleOptionLink"href="#parameter-name_constraints_critical"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">boolean</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Should the Name Constraints extension be considered as critical.</p>
<aclass="ansibleOptionLink"href="#parameter-name_constraints_excluded"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>For CA certificates, this specifies a list of identifiers which describe subtrees of names that this CA is <strong>not</strong> allowed to issue certificates for.</p>
<p>Values must be prefixed by their options. (i.e., <codeclass="docutils literal notranslate"><spanclass="pre">email</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">URI</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">DNS</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">RID</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">IP</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">dirName</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">otherName</span></code> and the ones specific to your CA).</p>
<aclass="ansibleOptionLink"href="#parameter-name_constraints_permitted"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>For CA certificates, this specifies a list of identifiers which describe subtrees of names that this CA is allowed to issue certificates for.</p>
<p>Values must be prefixed by their options. (i.e., <codeclass="docutils literal notranslate"><spanclass="pre">email</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">URI</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">DNS</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">RID</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">IP</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">dirName</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">otherName</span></code> and the ones specific to your CA).</p>
<aclass="ansibleOptionLink"href="#parameter-ocsp_must_staple"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: ocspMustStaple</span></p>
<td><divclass="ansible-option-cell"><p>Indicates that the certificate should contain the OCSP Must Staple extension (<aclass="reference external"href="https://tools.ietf.org/html/rfc7633">https://tools.ietf.org/html/rfc7633</a>).</p>
<aclass="ansibleOptionLink"href="#parameter-ocsp_must_staple_critical"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: ocspMustStaple_critical</span></p>
<td><divclass="ansible-option-cell"><p>Should the OCSP Must Staple extension be considered as critical.</p>
<p>Note that according to the RFC, this extension should not be marked as critical, as old clients not knowing about OCSP Must Staple are required to reject such certificates (see <aclass="reference external"href="https://tools.ietf.org/html/rfc7633#section-4">https://tools.ietf.org/html/rfc7633#section-4</a>).</p>
<aclass="ansibleOptionLink"href="#parameter-organization_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: O, organizationName</span></p>
<aclass="ansibleOptionLink"href="#parameter-organizational_unit_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: OU, organizationalUnitName</span></p>
<aclass="ansibleOptionLink"href="#parameter-privatekey_content"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The content of the private key to use when signing the certificate signing request.</p>
<p>Either <em>privatekey_path</em> or <em>privatekey_content</em> must be specified if <em>state</em> is <codeclass="docutils literal notranslate"><spanclass="pre">present</span></code>, but not both.</p>
<aclass="ansibleOptionLink"href="#parameter-privatekey_passphrase"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The passphrase for the private key.</p>
<p>This is required if the private key is password protected.</p>
<aclass="ansibleOptionLink"href="#parameter-privatekey_path"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">path</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The path to the private key to use when signing the certificate signing request.</p>
<p>Either <em>privatekey_path</em> or <em>privatekey_content</em> must be specified if <em>state</em> is <codeclass="docutils literal notranslate"><spanclass="pre">present</span></code>, but not both.</p>
<aclass="ansibleOptionLink"href="#parameter-select_crypto_backend"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Determines which crypto backend to use.</p>
<p>The default choice is <codeclass="docutils literal notranslate"><spanclass="pre">auto</span></code>, which tries to use <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> if available.</p>
<p>If set to <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code>, will try to use the <aclass="reference external"href="https://cryptography.io/">cryptography</a> library.</p>
<aclass="ansibleOptionLink"href="#parameter-state_or_province_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: ST, stateOrProvinceName</span></p>
<aclass="ansibleOptionLink"href="#parameter-subject"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">dictionary</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Key/value pairs that will be present in the subject name field of the certificate signing request.</p>
<p>If you need to specify more than one value with the same key, use a list as value.</p>
<p>If the order of the components is important, use <em>subject_ordered</em>.</p>
<p>Mutually exclusive with <em>subject_ordered</em>.</p>
<aclass="ansibleOptionLink"href="#parameter-subject_alt_name"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: subjectAltName</span></p>
<td><divclass="ansible-option-cell"><p>Subject Alternative Name (SAN) extension to attach to the certificate signing request.</p>
<p>Values must be prefixed by their options. (These are <codeclass="docutils literal notranslate"><spanclass="pre">email</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">URI</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">DNS</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">RID</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">IP</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">dirName</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">otherName</span></code>, and the ones specific to your CA).</p>
<p>Note that if no SAN is specified, but a common name, the common name will be added as a SAN except if <codeclass="docutils literal notranslate"><spanclass="pre">useCommonNameForSAN</span></code> is set to <em>false</em>.</p>
<p>More at <aclass="reference external"href="https://tools.ietf.org/html/rfc5280#section-4.2.1.6">https://tools.ietf.org/html/rfc5280#section-4.2.1.6</a>.</p>
<aclass="ansibleOptionLink"href="#parameter-subject_alt_name_critical"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: subjectAltName_critical</span></p>
<aclass="ansibleOptionLink"href="#parameter-subject_key_identifier"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The subject key identifier as a hex string, where two bytes are separated by colons.</p>
<p>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 or for own CAs.</p>
<p>Note that this option can only be used if <em>create_subject_key_identifier</em> is <codeclass="docutils literal notranslate"><spanclass="pre">false</span></code>.</p>
<p>Note that this is only supported if the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> backend is used!</p>
<aclass="ansibleOptionLink"href="#parameter-subject_ordered"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=dictionary</span></p>
<p><spanclass="ansible-option-versionadded">added in community.crypto 2.0.0</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>A list of dictionaries, where every dictionary must contain one key/value pair. This key/value pair will be present in the subject name field of the certificate signing request.</p>
<p>If you want to specify more than one value with the same key in a row, you can use a list as value.</p>
<p>Mutually exclusive with <em>subject</em>, and any other subject field option, such as <em>country_name</em>, <em>state_or_province_name</em>, <em>locality_name</em>, <em>organization_name</em>, <em>organizational_unit_name</em>, <em>common_name</em>, or <em>email_address</em>.</p>
<aclass="ansibleOptionLink"href="#parameter-use_common_name_for_san"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: useCommonNameForSAN</span></p>
<td><divclass="ansible-option-cell"><p>If set to <codeclass="docutils literal notranslate"><spanclass="pre">true</span></code>, the module will fill the common name in for <codeclass="docutils literal notranslate"><spanclass="pre">subject_alt_name</span></code> with <codeclass="docutils literal notranslate"><spanclass="pre">DNS:</span></code> prefix if no SAN is specified.</p>
<aclass="ansibleOptionLink"href="#parameter-version"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">integer</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The version of the certificate signing request.</p>
<p>The only allowed value according to <aclass="reference external"href="https://tools.ietf.org/html/rfc2986#section-4.1">RFC 2986</a> is 1.</p>
<p>This option no longer accepts unsupported values since community.crypto 2.0.0.</p>
<td><divclass="ansible-option-cell"><p>Can run in <codeclass="docutils literal notranslate"><spanclass="pre">check_mode</span></code> and return changed status prediction without modifying target.</p>
<td><divclass="ansible-option-cell"><p>Will return details on what has changed (or possibly needs changing in <codeclass="docutils literal notranslate"><spanclass="pre">check_mode</span></code>), when in diff mode.</p>
</div></td>
</tr>
</tbody>
</table>
</section>
<sectionid="notes">
<h2><aclass="toc-backref"href="#id5">Notes</a><aclass="headerlink"href="#notes"title="Permalink to this heading"></a></h2>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<ulclass="simple">
<li><p>If the certificate signing request already exists it will be checked whether subjectAltName, keyUsage, extendedKeyUsage and basicConstraints only contain the requested values, whether OCSP Must Staple is as requested, and if the request was signed by the given private key.</p></li>
</ul>
</div>
</section>
<sectionid="see-also">
<h2><aclass="toc-backref"href="#id6">See Also</a><aclass="headerlink"href="#see-also"title="Permalink to this heading"></a></h2>
<dt><aclass="reference internal"href="openssl_privatekey_pipe_module.html#ansible-collections-community-crypto-openssl-privatekey-pipe-module"><spanclass="std std-ref">community.crypto.openssl_privatekey_pipe</span></a></dt><dd><p>Generate OpenSSL private keys without disk access.</p>
<dt><aclass="reference internal"href="openssl_publickey_module.html#ansible-collections-community-crypto-openssl-publickey-module"><spanclass="std std-ref">community.crypto.openssl_publickey</span></a></dt><dd><p>Generate an OpenSSL public key from its private key.</p>
<dt><aclass="reference internal"href="openssl_csr_info_module.html#ansible-collections-community-crypto-openssl-csr-info-module"><spanclass="std std-ref">community.crypto.openssl_csr_info</span></a></dt><dd><p>Provide information of OpenSSL Certificate Signing Requests (CSR).</p>
<spanclass="p p-Indicator">-</span><spanclass="w"></span><spanclass="nt">name</span><spanclass="p">:</span><spanclass="w"></span><spanclass="l l-Scalar l-Scalar-Plain">Generate an OpenSSL Certificate Signing Request with an inline CSR</span><spanclass="w"></span>
<spanclass="w"></span><spanclass="nt">when</span><spanclass="p">:</span><spanclass="w"></span><spanclass="l l-Scalar l-Scalar-Plain">result is changed</span><spanclass="w"></span>
</pre></div>
</div>
</section>
<sectionid="return-values">
<h2><aclass="toc-backref"href="#id8">Return Values</a><aclass="headerlink"href="#return-values"title="Permalink to this heading"></a></h2>
<p>Common return values are documented <aclass="reference external"href="https://docs.ansible.com/ansible/devel/reference_appendices/common_return_values.html#common-return-values"title="(in Ansible vdevel)"><spanclass="xref std std-ref">here</span></a>, the following are the fields unique to this module:</p>
<aclass="ansibleOptionLink"href="#return-basicConstraints"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Indicates if the certificate belongs to a CA</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-csr"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The (current or generated) CSR’s content.</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-extendedKeyUsage"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Additional restriction on the public key purposes</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-keyUsage"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Purpose for which the public key may be used</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-name_constraints_excluded"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>List of excluded subtrees the CA cannot sign certificates for.</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-name_constraints_permitted"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>List of permitted subtrees to sign certificates for.</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-ocsp_must_staple"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">boolean</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Indicates whether the certificate has the OCSP Must Staple feature enabled</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-privatekey"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Path to the TLS/SSL private key the CSR was generated for</p>
<p>Will be <codeclass="docutils literal notranslate"><spanclass="pre">none</span></code> if the private key has been provided in <em>privatekey_content</em>.</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-subject"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=list</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>A list of the subject tuples attached to the CSR</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<aclass="ansibleOptionLink"href="#return-subjectAltName"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">list</span> / <spanclass="ansible-option-elements">elements=string</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The alternative names this CSR is valid for</p>
<pclass="ansible-option-line"><spanclass="ansible-option-returned-bold">Returned:</span> changed or success</p>
<ahref="https://github.com/ansible-collections/community.crypto/issues/new?assignees=&labels=&template=bug_report.md"aria-role="button"target="_blank"rel="noopener external">Submit a bug report</a>
<ahref="https://github.com/ansible-collections/community.crypto/issues/new?assignees=&labels=&template=feature_request.md"aria-role="button"target="_blank"rel="noopener external">Request a feature</a>
<ahref="openssl_csr_info_module.html"class="btn btn-neutral float-left"title="community.crypto.openssl_csr_info module – Provide information of OpenSSL Certificate Signing Requests (CSR)"accesskey="p"rel="prev"><spanclass="fa fa-arrow-circle-left"aria-hidden="true"></span> Previous</a>