mirror of
https://github.com/nikdoof/ansible-certbot.git
synced 2025-12-11 14:42:16 +00:00
Add option to disable requesting FQDN cert if not defined
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
---
|
||||
certbot_certs: []
|
||||
certbot_certs_email: root@{{ ansible_inventory }}
|
||||
certbot_request_fqdn_cert: true
|
||||
|
||||
certbot_plugin_arguments:
|
||||
digitalocean: --dns-digitalocean --dns-digitalocean-credentials /root/do_secrets.ini
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
- name: Certbot - Add host FQDN if not already listed in certs
|
||||
ansible.builtin.set_fact:
|
||||
certbot_certs: "{{ certbot_certs + [{'hostname': ansible_fqdn}] }}"
|
||||
when: certbot_certs | selectattr('hostname', 'equalto', ansible_fqdn) | list | length == 0
|
||||
when:
|
||||
- certbot_request_fqdn_cert
|
||||
- certbot_certs | selectattr('hostname', 'equalto', ansible_fqdn) | list | length == 0
|
||||
|
||||
- name: Certbot - Request Certificate
|
||||
ansible.builtin.include_tasks: cert.yaml
|
||||
|
||||
Reference in New Issue
Block a user