Add certbot_cli_options to populate cli.ini

When using snap and systemd timers to run certbot renew it is useful to
have the cli.ini file populated so we can define options, i.e. pre-hook,
post-hook, etc.
This commit is contained in:
Guilherme Balzana
2021-03-31 18:54:13 +01:00
parent fdba1c4352
commit 00927c9aff
2 changed files with 15 additions and 0 deletions
+6
View File
@@ -11,6 +11,12 @@
when: not letsencrypt_cert.stat.exists
with_items: "{{ certbot_create_standalone_stop_services }}"
- name: Add renew options to cli.ini file
copy:
path: /etc/letsencrypt/cli.ini
content: {{ certbot_cli_options }}
when: certbot_cli_options is defined
- name: Generate new certificate if one doesn't exist.
command: "{{ certbot_create_command }}"
when: not letsencrypt_cert.stat.exists