Get certificate for wiki using cert role

This commit is contained in:
julian 2023-05-01 00:22:05 +02:00
parent 1a0636307b
commit d4d2e973a1
3 changed files with 10 additions and 3 deletions

View file

@ -5,3 +5,9 @@ nginx__configurations:
content: "{{ lookup('ansible.builtin.file', 'configs/wiki/nginx/http_handler.conf') }}"
- name: wiki.ccchh.net
content: "{{ lookup('ansible.builtin.file', 'configs/wiki/nginx/wiki.ccchh.net.conf') }}"
cert__acme_account_email: j+letsencrypt-ccchh@jsts.xyz
cert__domains:
- "wiki.ccchh.net"
cert__bind_9_host: authoritative-dns
cert__bind_9_zone: ccchh.net

View file

@ -4,6 +4,7 @@
hosts: wiki
roles:
- nginx
- cert
tasks:
# TODO: make this a role
- name: Install php-fpm

View file

@ -14,10 +14,10 @@ server {
server_name wiki.ccchh.net;
ssl_certificate /etc/letsencrypt/live/wiki.ccchh.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wiki.ccchh.net/privkey.pem;
ssl_certificate /etc/ansible_certs/certs/wiki.ccchh.net/fullchain.pem;
ssl_certificate_key /etc/ansible_certs/certs/wiki.ccchh.net/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/wiki.ccchh.net/chain.pem;
ssl_trusted_certificate /etc/ansible_certs/certs/wiki.ccchh.net/chain.pem;
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
add_header Strict-Transport-Security "max-age=63072000" always;