roles/nginx: install acme.sh after downloading

This is basically just bootstrapping it. I used to do this by hand
before requesting the certs.
This commit is contained in:
Alan Orth 2021-09-27 11:28:02 +03:00
parent 79b29f0c51
commit 8d6c3c57c3
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -22,6 +22,19 @@
dest: "{{ letsencrypt_acme_script }}"
mode: 0700
# Run the "install" for acme.sh so it creates the .acme.sh dir (currently I
# have to chdir to the /root directory where the script exists or else it
# fails. Ansible runs it, but the script can't find itself...).
- name: Install acme.sh
ansible.builtin.command:
cmd: "{{ letsencrypt_acme_script }} --install --no-profile --no-cron"
creates: "{{ letsencrypt_acme_home }}/acme.sh"
chdir: /root
- name: Set default certificate authority for acme.sh
ansible.builtin.command:
cmd: "{{ letsencrypt_acme_script }} --set-default-ca --server letsencrypt"
- name: Prepare Let's Encrypt well-known directory
file:
state: directory