--- - block: - name: Setup a link for the ssl certificate file file: src={{ letsencrypt_acme_certs_dir }}/fullchain dest={{ zulip_ssl_cert_file }} state=link when: letsencrypt_acme_install - name: Setup a link for the ssl key file file: src={{ letsencrypt_acme_certs_dir }}/privkey dest={{ zulip_ssl_key_file }} state=link when: letsencrypt_acme_install - name: Create the acme hooks directory if it does not yet exist file: dest={{ letsencrypt_acme_services_scripts_dir }} state=directory owner=root group=root - name: Install a letsencrypt hook for nginx copy: src=nginx-letsencrypt-acme.sh dest={{ letsencrypt_acme_services_scripts_dir }}/nginx owner=root group=root mode=4555 when: - letsencrypt_acme_install is defined and letsencrypt_acme_install - zulip_letsencrypt_managed tags: [ 'zulip', 'letsencrypt' ] - block: - name: Remove the letsencrypt hook for nginx file: path={{ letsencrypt_acme_services_scripts_dir }}/nginx state=absent when: not zulip_letsencrypt_managed tags: [ 'zulip', 'letsencrypt' ]