Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to rerun validation if dns lookup hangs #58

Open
michaelamattes opened this issue Jul 29, 2021 · 2 comments
Open

add option to rerun validation if dns lookup hangs #58

michaelamattes opened this issue Jul 29, 2021 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@michaelamattes
Copy link
Collaborator

michaelamattes commented Jul 29, 2021

sometimes the dns challenge hangs due timeouts
DNS problem: SERVFAIL looking up TXT for _acme-challenge.bloxxter.in - the domain''s nameservers may be malfunctioning"

a rerun of the playbook recovers from the problem
this is a problem if the playbook runs in a pipeline, a manual interaction is needed every time

So we need an option to check if the validation succeeded, if not the check should be run a second time bevor the state becomes invalid.

@rndmh3ro
Copy link
Collaborator

This should be doable with register and until, something like this:


- name: Let the challenge be validated and retrieve the cert and intermediate certificate
  acme_certificate:
    account_key_src: "{{ acme_account_key_path }}"
    account_email: "{{ acme_account_email }}"
    csr: "{{ acme_csr_path }}"
    cert: "{{ acme_cert_path }}"
    fullchain: "{{ acme_fullchain_path }}"
    chain: "{{ acme_intermediate_path }}"
    challenge: dns-01
    force: "{{ acme_force_renewal | default(false) }}"
    acme_directory: "{{ acme_directory }}"
    acme_version: 2
    terms_agreed: true
    remaining_days: "{{ acme_remaining_days }}"
    data: "{{ challenge }}"
  register: validation
  until: validation.succeeded
  retries: 5
  delay: 10

I like this idea. We should then configure all validation-tasks like this.

@rndmh3ro rndmh3ro added the enhancement New feature or request label Jul 29, 2021
@avalor1
Copy link
Collaborator

avalor1 commented Jul 29, 2021

I thought about a rescue but until would be the better solution.

@rndmh3ro rndmh3ro added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants