Skip to content

Commit 9715fac

Browse files
authored
Merge pull request #2617 from codeenigma/updating-docs-PR-devel-2.x
Updating docs pr devel 2.x
2 parents 0c922fc + c559112 commit 9715fac

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

roles/aws/aws_vpc/tasks/main.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
description: "default VPC security group"
1919
purge_rules: false
2020

21-
- name: Debug.
22-
ansible.builtin.debug:
23-
msg: "{{ aws_vpc.security_groups }}"
24-
2521
- name: Create VPC Security groups.
2622
ansible.builtin.include_tasks: "security_group.yml"
2723
loop: "{{ aws_vpc.security_groups | list }}"

roles/debian/nginx/templates/vhost_letsencrypt.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ server {
77
listen 80;
88
{% endif %}
99
server_name {{ domain.server_name }};
10+
root /tmp;
1011
error_log {{ domain.error_log }} {{ domain.error_log_level }};
1112
access_log {{ domain.access_log }} {{ domain.access_log_format | default('main') }};
1213
# Proxy for certbot (LetsEncrypt)

roles/debian/ssl/README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ location /.well-known/acme-challenge/ {
2222
}
2323
```
2424

25-
If you are using LetsEncrypt handling combined with our `nginx` role and you set `ssl.http_01_port` then it should take care of the proxying, for example:
25+
If you are using LetsEncrypt handling combined with our `nginx` role and you set `ssl.http_01_port` and `ssl.web_server` to `standalone` then it should take care of the proxying, for example:
2626

2727
```yaml
2828
nginx:
@@ -38,13 +38,30 @@ nginx:
3838
services: []
3939
web_server: standalone
4040
certbot_register_command: "certonly --standalone --agree-tos --preferred-challenges http -n"
41-
certbot_renew_command: "certonly --standalone --agree-tos --force-renew"
41+
on_calendar: "Mon *-*-* 04:00:00"
42+
reload_command: reload
43+
reload:
44+
- nginx
45+
```
46+
webroot option
47+
```yaml
48+
nginx:
49+
domains:
50+
- # other domain variables here
51+
ssl:
52+
domains:
53+
- "{{ _domain_name }}"
54+
handling: letsencrypt
55+
autorenew: true
56+
email: administrator@example.com
57+
services: []
58+
web_server: webroot
59+
certbot_register_command: "certonly --standalone --agree-tos --preferred-challenges http -n"
60+
on_calendar: "Mon *-*-* 04:00:00"
4261
reload_command: reload
4362
reload:
4463
- nginx
4564
```
46-
Variable "on_calendar" is no longer in use since we have 1 general cron to renew all domains
47-
4865
"web_server" can be standalone and webroot, differnce is that webroot wont start webserver to validate SSL, while standalone requires port on which webserver will be running in order to validate cert so we need the "http_01_port" for standalone option
4966
5067
As in the example above, you need to include *all* variables required by the `letsencrypt` SSL handler because defaults will not load from the `ssl` role in this context.

roles/debian/ssl/defaults/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ ssl:
3333
http_01_port: 80 # you can set a non-standard port to listen on, but certbot still needs port 80 - see https://letsencrypt.org/docs/challenge-types/#http-01-challenge
3434
# For "letsencrypt" auto renewal
3535
autorenew: false # set to true to create a systemd timer to renew LE certs
36-
certbot_renew_command: "certonly --agree-tos --force-renew" # root of the command used in the systemd timer
37-
# See systemd.time documentation - https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Calendar%20Events
38-
on_calendar: "Mon *-*-* 04:00:00"
36+
on_calendar: "Mon *-*-* 04:00:00" # this is still needed to define when the cron will run, and it's needed in each ssl item not to break task
3937
web_server: standalone
4038
# values are standalone, webroot, nginx or apache - warning, nginx and apache will attempt to manipulate your vhosts!
41-
# webroot unlike standalone, won't start webserver with certain port
39+
# webroot unlike standalone, won't start webserver with certain port, so we can remove http_01_port
4240

4341
# For "letsencrypt" handling, a list of service to stop while creating the certificate.
4442
# This is because we need port 80 to be free.

0 commit comments

Comments
 (0)