letsencrypt/tasks/copy_ssl.yml

21 lines
519 B
YAML

---
- name: '[COPY SSL] - Fetch SSL Certificates'
synchronize:
mode: pull
src: '/etc/letsencrypt/'
dest: '/etc/ansible/ssl/{{ inventory_hostname }}'
when: install_letsencrypt == 'true'
notify:
- reload nginx
- name: '[COPY SSL] - Copy SSL certificates to containers behind proxy'
synchronize:
src: '/etc/ansible/ssl/{{ item.name }}/'
dest: '/etc/letsencrypt/'
when: letsencrypt_copy_certs == 'true'
with_items: '{{ letsencrypt_copy_cert_from }}'
notify:
- reload nginx