Files
ansible-certbot/tasks/request_certs.yaml
2023-06-23 07:18:31 +01:00

10 lines
347 B
YAML

---
- name: Add 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
- name: Request Certificate
ansible.builtin.include_tasks: cert.yaml
loop: "{{ certbot_certs }}"