ansible/roles/acme/tasks/san_domains_loop.yaml

11 lines
315 B
YAML

---
- ansible.builtin.stat:
path: "/var/lib/dehydrated/certs/{{ domains[0] }}"
register: cert_stat
- ansible.builtin.file:
state: link
path: "/var/lib/dehydrated/certs/{{ item }}"
src: "/var/lib/dehydrated/certs/{{ domains[0] }}"
loop: "{{ domains[1:] }}"
when: cert_stat.stat.exists == True