Files
ansible-certbot/tasks/request_certs.yaml
2024-03-31 10:01:57 +01:00

10 lines
372 B
YAML

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