community.crypto.acme_dns_persist_record filter – Craft a DNS record for ACME dns-persist-01 challenges

Note

This filter plugin is part of the community.crypto collection (version 3.3.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.crypto.

To use it in a playbook, specify: community.crypto.acme_dns_persist_record.

New in community.crypto 3.2.0

Synopsis

  • Craft the content for a ACME dns-persist-01 DNS TXT record _validation-persist.<domain>.

  • This filter conforms to the acme-dns-persist draft 01. Note that the supported draft version can change at any time, and changes will only be considered breaking once the draft reached RFC status.

Input

This describes the input of the filter, the value before | community.crypto.acme_dns_persist_record.

Parameter

Comments

Input

string / required

The issuer domain name.

Keyword parameters

This describes keyword parameters of the filter. These are the values key1=value1, key2=value2 and so on in the following example: input | community.crypto.acme_dns_persist_record(key1=value1, key2=value2, ...)

Parameter

Comments

account_uri

string / required

The ACME account URI.

persist_until

any

Until when the record is valid.

Can be specified as a UNIX time stamp (integer), as a Python datetime object, or as a relative time or absolute timestamp specified as a string.

Times specified as strings will always be interpreted as UTC. Valid format is [+-]timespec | ASN.1 TIME where timespec can be an integer + [w | d | h | m | s] (for example +32w1d2h).

policy

string

The validation scope.

Choices:

  • "wildcard": If this value is present, the CA MAY consider this validation sufficient for issuing certificates for the validated FQDN, for specific subdomains of the validated FQDN (as covered by wildcard scope or specific subdomain validation rules), and for wildcard certificates (for example *.example.com). See Section 5 and Section 6 of the acme-dns-persist draft 01.

See Also

See also

community.crypto.acme_certificate

Create SSL/TLS certificates with the ACME protocol.

community.crypto.acme_certificate_order_create

Create an ACME v2 order.

community.crypto.acme_certificate_order_validate

Validate authorizations of an ACME v2 order.

Examples

---
- name: Create _validation-persist.<domain> TXT record contents
  ansible.builtin.debug:
    msg: >-
      {{
        'letsencrypt.org' | community.crypto.acme_dns_persist_record(
          account_uri='https://acme-v02.api.letsencrypt.org/acme/acct/1234',
          policy='wildcard',
          persist_until='+1w',
        )
      }}

- name: Create _validation-persist.<domain> TXT record for example.com
  community.dns.hetzner_dns_record_set:
    prefix: _validation-persist
    zone_name: example.com
    value:
      - >-
        {{
          'letsencrypt.org' | community.crypto.acme_dns_persist_record(
            account_uri='https://acme-v02.api.letsencrypt.org/acme/acct/4321',
            persist_until='20190331202428Z',
          )
        }}

Return Value

Key

Description

Return value

string

The content for the _validation-persist.<domain> TXT record.

Returned: success

Authors

  • Felix Fontein (@felixfontein)