Browse Source

fix path of certificate

fixes #2
main
parent
commit
c35b9b6c94
  1. 8
      tasks/main.yml

8
tasks/main.yml

@ -29,15 +29,11 @@
name: nginx
state: restarted
- name: Create letsencrypt combined certificate
shell: letsencrypt certonly -n --renew-with-new-domains --webroot -w /var/www/letsencrypt -m {{ nginx_letsencrypt_email }} --agree-tos -d "{{ nginx_hosts | map(attribute='domain_name') | join(',') }}"
args:
creates: "/etc/letsencrypt/live/{{ nginx_hosts | map(attribute='domain_name') | first }}"
shell: letsencrypt certonly -n --webroot -w /var/www/letsencrypt -m {{ nginx_letsencrypt_email }} --agree-tos -d "{{ nginx_hosts | map(attribute='domain_name') | join(',') }}" --renew-with-new-domains --cert-name "{{ nginx_hosts | map(attribute='domain_name') | first }}"
when: nginx_single_cert
- name: Create letsencrypt standalone certificate
shell: letsencrypt certonly -n --webroot -w /var/www/letsencrypt -m {{ nginx_letsencrypt_email }} --agree-tos -d "{{ item }}"
shell: letsencrypt certonly -n --webroot -w /var/www/letsencrypt -m {{ nginx_letsencrypt_email }} --agree-tos -d "{{ item }}" --cert-name "{{ nginx_hosts | map(attribute='domain_name') }}"
loop: "{{ nginx_hosts | map(attribute='domain_name') }}"
args:
creates: "/etc/letsencrypt/live/{{ item }}"
when: not nginx_single_cert
- name: Generate dhparams
shell: openssl dhparam -out /etc/nginx/dhparams.pem 2048

Loading…
Cancel
Save