Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo of variable "letsencrypt_challenge_root" #383

Merged
merged 1 commit into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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