<linkrel="next"title="community.crypto.certificate_complete_chain module – Complete certificate chain given a set of untrusted and root certificates"href="certificate_complete_chain_module.html"/>
<linkrel="prev"title="community.crypto.acme_challenge_cert_helper module – Prepare certificates required for ACME challenges such as tls-alpn-01"href="acme_challenge_cert_helper_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_ari_info_module.html">community.crypto.acme_ari_info module – Retrieves ACME Renewal Information (ARI) for a certificate</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_deactivate_authz_module.html">community.crypto.acme_certificate_deactivate_authz module – Deactivate all authz for an ACME v2 order</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="acme_certificate_renewal_info_module.html">community.crypto.acme_certificate_renewal_info module – Determine whether a certificate should be renewed or not</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 current"><aclass="current reference internal"href="#">community.crypto.acme_inspect module – Send direct requests to an ACME server</a><ul>
<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="gpg_keypair_module.html">community.crypto.gpg_keypair module – Generate or delete GPG private and public keys</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="x509_crl_info_module.html">community.crypto.x509_crl_info module – Retrieve information on Certificate Revocation Lists (CRLs)</a></li>
</ul>
<ul>
<liclass="toctree-l1"><aclass="reference internal"href="gpg_fingerprint_filter.html">community.crypto.gpg_fingerprint filter – Retrieve a GPG fingerprint from a GPG public or private key</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="openssl_csr_info_filter.html">community.crypto.openssl_csr_info filter – Retrieve information from OpenSSL Certificate Signing Requests (CSR)</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="parse_serial_filter.html">community.crypto.parse_serial filter – Convert a serial number as a colon-separated list of hex numbers to an integer</a></li>
<liclass="toctree-l1"><aclass="reference internal"href="to_serial_filter.html">community.crypto.to_serial filter – Convert an integer to a colon-separated list of hex numbers</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>
</ul>
<ul>
<liclass="toctree-l1"><aclass="reference internal"href="gpg_fingerprint_lookup.html">community.crypto.gpg_fingerprint lookup – Retrieve a GPG fingerprint from a GPG public or private key file</a></li>
</ul>
<!-- extra nav elements for Ansible beyond RTD Sphinx Theme -->
<liclass="breadcrumb-item active">community.crypto.acme_inspect module – Send direct requests to an ACME server</li>
<liclass="wy-breadcrumbs-aside">
<!-- User defined GitHub URL -->
<ahref="https://github.com/ansible-collections/community.crypto/edit/main/plugins/modules/acme_inspect.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>
<h1>community.crypto.acme_inspect module – Send direct requests to an ACME server<aclass="headerlink"href="#community-crypto-acme-inspect-module-send-direct-requests-to-an-acme-server"title="Link to this heading"></a></h1>
<p>This module is part of the <aclass="reference external"href="https://galaxy.ansible.com/ui/repo/published/community/crypto/">community.crypto collection</a> (version 2.21.0).</p>
<p>It is not included in <codeclass="docutils literal notranslate"><spanclass="pre">ansible-core</span></code>.
To check whether it is installed, run <codeclass="code docutils literal notranslate"><spanclass="pre">ansible-galaxy</span><spanclass="pre">collection</span><spanclass="pre">list</span></code>.</p>
You need further requirements to be able to use this module,
see <aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-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.acme_inspect</span></code>.</p>
<h2><aclass="toc-backref"href="#id1"role="doc-backlink">Synopsis</a><aclass="headerlink"href="#synopsis"title="Link to this heading"></a></h2>
<ulclass="simple">
<li><p>Allows to send direct requests to an ACME server with the <aclass="reference external"href="https://tools.ietf.org/html/rfc8555">ACME protocol</a>, which is supported by CAs such as <aclass="reference external"href="https://letsencrypt.org/">Let’s Encrypt</a>.</p></li>
<li><p>This module can be used to debug failed certificate request attempts, for example when <aclass="reference internal"href="acme_certificate_module.html#ansible-collections-community-crypto-acme-certificate-module"><spanclass="std std-ref">community.crypto.acme_certificate</span></a> fails or encounters a problem which you wish to investigate.</p></li>
<li><p>The module can also be used to directly access features of an ACME servers which are not yet supported by the Ansible ACME modules.</p></li>
</ul>
</section>
<sectionid="requirements">
<spanid="ansible-collections-community-crypto-acme-inspect-module-requirements"></span><h2><aclass="toc-backref"href="#id2"role="doc-backlink">Requirements</a><aclass="headerlink"href="#requirements"title="Link to this heading"></a></h2>
<p>The below requirements are needed on the host that executes this module.</p>
<ulclass="simple">
<li><p>either openssl or <aclass="reference external"href="https://cryptography.io/">cryptography</a>>= 1.5</p></li>
<li><p>ipaddress</p></li>
</ul>
</section>
<sectionid="parameters">
<h2><aclass="toc-backref"href="#id3"role="doc-backlink">Parameters</a><aclass="headerlink"href="#parameters"title="Link to this heading"></a></h2>
<aclass="ansibleOptionLink"href="#parameter-account_key_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>Content of the ACME account RSA or Elliptic Curve key.</p>
<p>Mutually exclusive with <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-account-key-src"><spanclass="std std-ref"><spanclass="pre">account_key_src</span></span></a></strong></code>.</p>
<p>Required if <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-account-key-src"><spanclass="std std-ref"><spanclass="pre">account_key_src</span></span></a></strong></code> is not used.</p>
<p><strong>Warning:</strong> the content will be written into a temporary file, which will be deleted by Ansible when the module completes. Since this is an important private key — it can be used to change the account key, or to revoke your certificates without knowing their private keys —, this might not be acceptable.</p>
<p>In case <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> is used, the content is not written into a temporary file. It can still happen that it is written to disk by Ansible in the process of moving the module with its argument to the node where it is executed.</p>
<aclass="ansibleOptionLink"href="#parameter-account_key_passphrase"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span></p>
<p><emclass="ansible-option-versionadded">added in community.crypto 1.6.0</em></p>
</div></td>
<td><divclass="ansible-option-cell"><p>Phassphrase to use to decode the account key.</p>
<p><strong>Note:</strong> this is not supported by the <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span></code> backend, only by the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> backend.</p>
<aclass="ansibleOptionLink"href="#parameter-account_key_src"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-aliases">aliases: account_key</span></p>
<td><divclass="ansible-option-cell"><p>Path to a file containing the ACME account RSA or Elliptic Curve key.</p>
<p>Private keys can be created with the <aclass="reference internal"href="openssl_privatekey_module.html#ansible-collections-community-crypto-openssl-privatekey-module"><spanclass="std std-ref">community.crypto.openssl_privatekey</span></a> or <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> modules. If the requisite (cryptography) is not available, keys can also be created directly with the <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span></code> command line tool: RSA keys can be created with <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span><spanclass="pre">genrsa</span><spanclass="pre">...</span></code>. Elliptic curve keys can be created with <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span><spanclass="pre">ecparam</span><spanclass="pre">-genkey</span><spanclass="pre">...</span></code>. Any other tool creating private keys in PEM format can be used as well.</p>
<p>Mutually exclusive with <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-account-key-content"><spanclass="std std-ref"><spanclass="pre">account_key_content</span></span></a></strong></code>.</p>
<p>Required if <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-account-key-content"><spanclass="std std-ref"><spanclass="pre">account_key_content</span></span></a></strong></code> is not used.</p>
<aclass="ansibleOptionLink"href="#parameter-account_uri"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>If specified, assumes that the account URI is as given. If the account key does not match this account, or an account with this URI does not exist, the module fails.</p>
<aclass="ansibleOptionLink"href="#parameter-acme_directory"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">string</span> / <spanclass="ansible-option-required">required</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The ACME directory to use. This is the entry point URL to access the ACME CA server API.</p>
<p>For safety reasons the default is set to the Let’s Encrypt staging server (for the ACME v1 protocol). This will create technically correct, but untrusted certificates.</p>
<p>For Let’s Encrypt, all staging endpoints can be found here: <aclass="reference external"href="https://letsencrypt.org/docs/staging-environment/">https://letsencrypt.org/docs/staging-environment/</a>. For Buypass, all endpoints can be found here: <aclass="reference external"href="https://community.buypass.com/t/63d4ay/buypass-go-ssl-endpoints">https://community.buypass.com/t/63d4ay/buypass-go-ssl-endpoints</a></p>
<p>For <strong>Let’s Encrypt</strong>, the production directory URL for ACME v2 is <aclass="reference external"href="https://acme-v02.api.letsencrypt.org/directory">https://acme-v02.api.letsencrypt.org/directory</a>.</p>
<p>For <strong>Buypass</strong>, the production directory URL for ACME v2 and v1 is <aclass="reference external"href="https://api.buypass.com/acme/directory">https://api.buypass.com/acme/directory</a>.</p>
<p>For <strong>ZeroSSL</strong>, the production directory URL for ACME v2 is <aclass="reference external"href="https://acme.zerossl.com/v2/DV90">https://acme.zerossl.com/v2/DV90</a>.</p>
<p>For <strong>Sectigo</strong>, the production directory URL for ACME v2 is <aclass="reference external"href="https://acme-qa.secure.trust-provider.com/v2/DV">https://acme-qa.secure.trust-provider.com/v2/DV</a>.</p>
<p>The notes for this module contain a list of ACME services this module has been tested against.</p>
<aclass="ansibleOptionLink"href="#parameter-acme_version"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">integer</span> / <spanclass="ansible-option-required">required</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The ACME version of the endpoint.</p>
<p>Must be <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">1</span></code> for the classic Let’s Encrypt and Buypass ACME endpoints, or <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">2</span></code> for standardized ACME v2 endpoints.</p>
<p>The value <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">1</span></code> is deprecated since community.crypto 2.0.0 and will be removed from community.crypto 3.0.0.</p>
<aclass="ansibleOptionLink"href="#parameter-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>An encoded JSON object which will be sent as the content if <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-method"><spanclass="std std-ref"><spanclass="pre">method</span></span></a></strong></code> is <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">post</span></code>.</p>
<p>Required when <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-method"><spanclass="std std-ref"><spanclass="pre">method</span></span></a></strong></code> is <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">post</span></code>, and not allowed otherwise.</p>
<aclass="ansibleOptionLink"href="#parameter-fail_on_acme_error"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>If <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-method"><spanclass="std std-ref"><spanclass="pre">method</span></span></a></strong></code> is <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">post</span></code> or <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">get</span></code>, make the module fail in case an ACME error is returned.</p>
<aclass="ansibleOptionLink"href="#parameter-method"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 method to use to access the given URL on the ACME server.</p>
<p>The value <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">post</span></code> executes an authenticated POST request. The content must be specified in the <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-content"><spanclass="std std-ref"><spanclass="pre">content</span></span></a></strong></code> option.</p>
<p>The value <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">get</span></code> executes an authenticated POST-as-GET request for ACME v2, and a regular GET request for ACME v1.</p>
<p>The value <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">directory-only</span></code> only retrieves the directory, without doing a request.</p>
<aclass="ansibleOptionLink"href="#parameter-request_timeout"title="Permalink to this option"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">integer</span></p>
<p><emclass="ansible-option-versionadded">added in community.crypto 2.3.0</em></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The time Ansible should wait for a response from the ACME API.</p>
<p>This timeout is applied to all HTTP(S) requests (HEAD, GET, POST).</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="ansible-value docutils literal notranslate"><spanclass="pre">auto</span></code>, which tries to use <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> if available, and falls back to <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span></code>.</p>
<p>If set to <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">openssl</span></code>, will try to use the <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span></code> binary.</p>
<p>If set to <codeclass="ansible-value 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-url"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 URL to send the request to.</p>
<p>Must be specified if <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-method"><spanclass="std std-ref"><spanclass="pre">method</span></span></a></strong></code> is not <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">directory-only</span></code>.</p>
<aclass="ansibleOptionLink"href="#parameter-validate_certs"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>Whether calls to the ACME directory will validate TLS certificates.</p>
<p><strong>Warning:</strong> Should <strong>only ever</strong> be set to <codeclass="ansible-value docutils literal notranslate"><spanclass="pre">false</span></code> for testing purposes, for example when testing against a local Pebble server.</p>
<td><divclass="ansible-option-cell"><p>Use <codeclass="docutils literal notranslate"><spanclass="pre">group/acme</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">group/community.crypto.acme</span></code> in <codeclass="docutils literal notranslate"><spanclass="pre">module_defaults</span></code> to set defaults for this module.</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"role="doc-backlink">Notes</a><aclass="headerlink"href="#notes"title="Link to this heading"></a></h2>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<ulclass="simple">
<li><p>The <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-account-uri"><spanclass="std std-ref"><spanclass="pre">account_uri</span></span></a></strong></code> option must be specified for properly authenticated ACME v2 requests (except a <codeclass="docutils literal notranslate"><spanclass="pre">new-account</span></code> request).</p></li>
<li><p>Using the <codeclass="docutils literal notranslate"><spanclass="pre">ansible</span></code> tool, <aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module"><spanclass="std std-ref">community.crypto.acme_inspect</span></a> can be used to directly execute ACME requests without the need of writing a playbook. For example, the following command retrieves the ACME account with ID 1 from Let’s Encrypt (assuming <codeclass="docutils literal notranslate"><spanclass="pre">/path/to/key</span></code> is the correct private account key): <codeclass="docutils literal notranslate"><spanclass="pre">ansible</span><spanclass="pre">localhost</span><spanclass="pre">-m</span><spanclass="pre">acme_inspect</span><spanclass="pre">-a</span><spanclass="pre">"account_key_src=/path/to/key</span><spanclass="pre">acme_directory=https://acme-v02.api.letsencrypt.org/directory</span><spanclass="pre">acme_version=2</span><spanclass="pre">account_uri=https://acme-v02.api.letsencrypt.org/acme/acct/1</span><spanclass="pre">method=get</span><spanclass="pre">url=https://acme-v02.api.letsencrypt.org/acme/acct/1"</span></code></p></li>
<li><p>Although the defaults are chosen so that the module can be used with the <aclass="reference external"href="https://letsencrypt.org/">Let’s Encrypt</a> CA, the module can in principle be used with any CA providing an ACME endpoint, such as <aclass="reference external"href="https://www.buypass.com/ssl/products/acme">Buypass Go SSL</a>.</p></li>
<li><p>So far, the ACME modules have only been tested by the developers against Let’s Encrypt (staging and production), Buypass (staging and production), ZeroSSL (production), and <aclass="reference external"href="https://github.com/letsencrypt/Pebble">Pebble testing server</a>. We have got community feedback that they also work with Sectigo ACME Service for InCommon. If you experience problems with another ACME server, please <aclass="reference external"href="https://github.com/ansible-collections/community.crypto/issues/new/choose">create an issue</a> to help us supporting it. Feedback that an ACME server not mentioned does work is also appreciated.</p></li>
<li><p>If a new enough version of the <codeclass="docutils literal notranslate"><spanclass="pre">cryptography</span></code> library is available (see Requirements for details), it will be used instead of the <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span></code> binary. This can be explicitly disabled or enabled with the <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-select-crypto-backend"><spanclass="std std-ref"><spanclass="pre">select_crypto_backend</span></span></a></strong></code> option. Note that using the <codeclass="docutils literal notranslate"><spanclass="pre">openssl</span></code> binary will be slower and less secure, as private key contents always have to be stored on disk (see <codeclass="ansible-option docutils literal notranslate"><strong><aclass="reference internal"href="#ansible-collections-community-crypto-acme-inspect-module-parameter-account-key-content"><spanclass="std std-ref"><spanclass="pre">account_key_content</span></span></a></strong></code>).</p></li>
</ul>
</div>
</section>
<sectionid="see-also">
<h2><aclass="toc-backref"href="#id6"role="doc-backlink">See Also</a><aclass="headerlink"href="#see-also"title="Link to this heading"></a></h2>
<divclass="admonition seealso">
<pclass="admonition-title">See also</p>
<dlclass="simple">
<dt><aclass="reference external"href="https://tools.ietf.org/html/rfc8555">Automatic Certificate Management Environment (ACME)</a></dt><dd><p>The specification of the ACME protocol (RFC 8555).</p>
</dd>
<dt><aclass="reference external"href="https://www.rfc-editor.org/rfc/rfc8737.html">ACME TLS ALPN Challenge Extension</a></dt><dd><p>The specification of the <codeclass="docutils literal notranslate"><spanclass="pre">tls-alpn-01</span></code> challenge (RFC 8737).</p>
</dd>
</dl>
</div>
</section>
<sectionid="examples">
<h2><aclass="toc-backref"href="#id7"role="doc-backlink">Examples</a><aclass="headerlink"href="#examples"title="Link to this heading"></a></h2>
<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">Get first authz for order</span>
<h2><aclass="toc-backref"href="#id8"role="doc-backlink">Return Values</a><aclass="headerlink"href="#return-values"title="Link 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-directory"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">dictionary</span></p>
<aclass="ansibleOptionLink"href="#return-headers"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">dictionary</span></p>
<aclass="ansibleOptionLink"href="#return-output_json"title="Permalink to this return value"></a><pclass="ansible-option-type-line"><spanclass="ansible-option-type">dictionary</span></p>
</div></td>
<td><divclass="ansible-option-cell"><p>The output parsed as JSON</p>
<pclass="ansible-option-line"><strongclass="ansible-option-returned-bold">Returned:</strong> if output can be parsed as JSON</p>
<aclass="ansibleOptionLink"href="#return-output_text"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 raw text output</p>
<ahref="acme_challenge_cert_helper_module.html"class="btn btn-neutral float-left"title="community.crypto.acme_challenge_cert_helper module – Prepare certificates required for ACME challenges such as tls-alpn-01"accesskey="p"rel="prev"><spanclass="fa fa-arrow-circle-left"aria-hidden="true"></span> Previous</a>
<ahref="certificate_complete_chain_module.html"class="btn btn-neutral float-right"title="community.crypto.certificate_complete_chain module – Complete certificate chain given a set of untrusted and root certificates"accesskey="n"rel="next">Next <spanclass="fa fa-arrow-circle-right"aria-hidden="true"></span></a>