brunobenchimol / ansible-role-certbot-dns

Ansible Role - Certbot using dns-01 challenge
https://galaxy.ansible.com/brunobenchimol/certbot_dns
MIT License
5 stars 4 forks source link

Allow propagtion seconds to be configurable #4

Open fliespl opened 1 day ago

fliespl commented 1 day ago

--dns-cloudflare-propagation-seconds

Currently using:

certbot_dns_credentials_file: "/etc/letsencrypt/dns-{{ certbot_dns_plugin }}-credentials --dns-cloudflare-propagation-seconds 60" # hack to add propagtion seconds

as workaround

brunobenchimol commented 17 hours ago

What about creating a new var certbot_create_command_extra_args that you can put anything you want on "create command" ?

You can enable it with certbot_enable_extra_args = true.

i am currently unable to change it and test it atm but you could change it to:

certbot_create_command: >-
  {{ certbot_script }} certonly
  {{ '--hsts' if certbot_hsts else '' }}
  {{ '--test-cert' if certbot_testmode else '' }}
  {{ certbot_create_command_extra_args if certbot_enable_extra_args else '' }}
  --noninteractive --agree-tos
  --dns-{{ certbot_dns_plugin }} --dns-{{ certbot_dns_plugin }}-credentials {{ certbot_dns_credentials_file }}
  --email {{ cert_item.email | default(certbot_admin_email) }}
  -d {{ cert_item.domains | join(',') }}
  {{ '--deploy-hook /etc/letsencrypt/renewal-hooks/deploy/reload_services.sh'
    if certbot_create_reload_services
  else '' }}

let me know if it works and solve your issue.