Skip to content
Open
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
6 changes: 5 additions & 1 deletion ansible/roles/distributed_press/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@
name: nginx

- name: "Register certbot certificate"
shell: "certbot --nginx --non-interactive -d {{distributed_press_domain}} {{ distributed_press_served_sites | map('regex_replace', '^', '-d ') | join(' ') }} {% if (social_inbox_enabled) %} -d {{ social_inbox_domain }} {% endif %}--expand --agree-tos --no-eff-email --email {{distributed_press_letsencrypt_email}}"
shell: "certbot --nginx --non-interactive -d {{distributed_press_domain}} {% if (social_inbox_enabled) %} -d {{ social_inbox_domain }} {% endif %}--expand --agree-tos --no-eff-email --email {{distributed_press_letsencrypt_email}}"

- name: "Register certbot certificate for each site"
shell: "certbot --nginx --non-interactive -d {{item}} --expand --agree-tos --no-eff-email --email {{distributed_press_letsencrypt_email}}"
loop: "{{distributed_press_served_sites}}"

- name: "Copy over default site config"
template:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/distributed_press/templates/nginx-static.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ server {

listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/{{distributed_press_cert_name}}/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/{{distributed_press_cert_name}}/privkey.pem; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/{{item}}/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/{{item}}/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
Expand Down
Loading