Deploy certs for zigbee2mqtt.ccchh.net using new certbot role

Also add certbot role to deploy.yaml playbook and add accompanying
group.
This commit is contained in:
June 2023-08-02 22:53:37 +02:00 committed by julian
commit 154a7dfa02
5 changed files with 17 additions and 10 deletions

View file

@ -57,6 +57,11 @@
roles:
- cert
- name: Ensure certbot and certificate deployment on certbot_hosts
hosts: certbot_hosts
roles:
- certbot
- name: Ensure Docker Compose deployment on docker_compose_hosts
hosts: docker_compose_hosts
roles:

View file

@ -7,6 +7,7 @@ map $host $upstream_acme_challenge_host {
thinkcccore2.ccchh.net 10.31.242.5;
thinkcccore3.ccchh.net 10.31.242.6;
wiki.ccchh.net 10.31.206.13;
zigbee2mqtt.ccchh.net 10.31.208.25:31820;
default "";
}

View file

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