ansible/roles/certbot/tasks/issue.yaml

10 lines
434 B
YAML
Raw Normal View History

2019-11-25 00:50:05 +00:00
---
- name: "determine if certificate for {{ item.domains | join(', ') }}"
stat:
path: "/etc/letsencrypt/live/{{ item.domains | first }}/cert.pem"
register: st
- name: "request certificate for {{ item.domains | join(', ') }}"
2019-12-01 19:45:19 +00:00
command: "certbot certonly -q --webroot -w {{ certbot_challenge_webroot_path }} --agree-tos --noninteractive --email {{ item.email }} -d {{ item.domains | join(',') }}"
2019-11-25 00:50:05 +00:00
when: not st.stat.exists