Skip to content

Commit

Permalink
Fix typo of variable "letsencrypt_challenge_root" (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
theskumar authored Dec 5, 2019
1 parent 647a49c commit 00f2a25
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: create certbot folder
become: yes
file: path={{ letsencrypt_challange_root }} state=directory owner={{ user }} group={{ nginx_user }} mode="u=rwx,g=rwxs,o=r"
file: path={{ letsencrypt_challenge_root }} state=directory owner={{ user }} group={{ nginx_user }} mode="u=rwx,g=rwxs,o=r"

- name: reload nginx
service: name=nginx state=reloaded
Expand All @@ -33,7 +33,7 @@
service: name=nginx state=stopped

- name: request cert
shell: certbot certonly --standalone -w {{ letsencrypt_challange_root }} -d {{ domain_name }} --email {{ letsencrypt_email }} --agree-tos --non-interactive
shell: certbot certonly --standalone -w {{ letsencrypt_challenge_root }} -d {{ domain_name }} --email {{ letsencrypt_email }} --agree-tos --non-interactive
args:
creates: '{{ letsencrypt_ssl_cert_dir }}'

Expand All @@ -45,4 +45,13 @@

- name: symblink certificates
file: src={{ letsencrypt_ssl_cert_dir }} dest={{ ssl_cert_dir }}/{{ domain_name }} owner={{ user }} group=www-data state=link

# running cron job each monday
- name: add letsencrypt renew cron
cron:
name: "Renew all certificates"
minute: "0"
hour: "2"
weekday: "1"
job: "certbot renew --non-interactive --webroot --webroot-path {{ letsencrypt_challenge_root }} --renew-hook 'service nginx reload' >> /var/log/certbot.log"
{%endraw%}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@
- import_tasks: letsencrypt.yml
when: vm == 0 and use_letsencrypt and letsencrypt_dir.stat.exists == false

# running cron job each monday
- name: add letsencrypt renew cron
cron:
name: "Renew all certificates"
minute: "0"
hour: "2"
weekday: "1"
job: 'certbot renew --non-interactive --webroot -w {{ letsencrypt_challange_root }} --renew-hook "service nginx reload"'
when: vm == 0 and use_letsencrypt

- name: check ssl/nginx.crt exists
stat: path={{ ssl_certificate }}
register: nginx_cert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ server {

{% if use_letsencrypt %}
location /.well-known/acme-challenge {
root {{ letsencrypt_challange_root }};
root {{ letsencrypt_challenge_root }};
try_files $uri =404;
}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ server {

{% if use_letsencrypt %}
location /.well-known/acme-challenge/ {
root {{ letsencrypt_challange_root }};
root {{ letsencrypt_challenge_root }};
try_files $uri =404;
}
{% endif %}
Expand Down

0 comments on commit 00f2a25

Please sign in to comment.