jitsi: new role (on host zirconium.binary-kitchen.net)

This commit is contained in:
Markus 2020-05-20 09:57:18 +02:00
parent dcadf88ada
commit 5a2b3559db
9 changed files with 83 additions and 1 deletions

View File

@ -28,6 +28,8 @@ hackmd_dbuser: hackmd
hackmd_dbpass: "{{ vault_hackmd_dbpass }}" hackmd_dbpass: "{{ vault_hackmd_dbpass }}"
hackmd_secret: "{{ vault_hackmd_secret }}" hackmd_secret: "{{ vault_hackmd_secret }}"
jitsi_domain: jitsi.binary-kitchen.de
ldap_uri: ldaps://ldap.binary.kitchen ldap_uri: ldaps://ldap.binary.kitchen
ldap_host: ldap.binary.kitchen ldap_host: ldap.binary.kitchen
ldap_base: dc=binary-kitchen,dc=de ldap_base: dc=binary-kitchen,dc=de

View File

@ -0,0 +1,4 @@
---
root_keys_host:
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtTJqeSsB+aRiQ2WeFLVA5dz5YfCuv2TZmsyFqZ8NefJH/ZP3+gud3DwBq4l9HbDJUbfvApLQ9qbwaX0VhBv67mM6f4sWNG8uUW+9MYd6ZTeP3KUwZIHM52nqMFe5XScADL4s8Jsnb08gVp9xdcdufsbiLNYfuNFk+wcwRYtD5eqXZi3oaqshlq61LfBeC958vzvceDrZ2obfCJJ2pvmhUyORvgb6jXfx3kZku5qgk6m9NfyY95UZvSweDZPiN5YqLYekz+jxrYDyeA0DPgwlTcyGn8JI9/HkAD/odTpTAH+T6sbf0OkUi7ufNElAXvxDOJZN8NhxPFfUAW9naTYwGoPd4OJw0AOVLzKcVIjEXKtrxeQ0NOZVoucLFgnXO4iDZGrVHohPVj1UbrVpF00lokBLz1Xh4egrNw0g2Gt28HmZ9lg5Ymv8jJWAy87r5wV0O6aIuseGkSr/V6+92AGK/Yy1tKhZujtv5+CvVVBrLvoOnJJh8vFoVuRM+ucLBhqpewDY2yHZHzQ3J5SZKJ30mBUSYAKHBqVI4VmC/n235VMumIEsqnZvzk96G5TXWyZb0qzkXcct1H8MyQgG0SR0G4Ylm5skCZppEE7udV/wb8lRZv+2YrqBueKZ+Wu6IT3HJbUkor7CcbORjhwL4ETziPm4g4BrTPGUTjyeZ4nSDPQ== exxess"

1
hosts
View File

@ -21,3 +21,4 @@ neon.binary-kitchen.net
sodium.binary-kitchen.net sodium.binary-kitchen.net
krypton.binary-kitchen.net krypton.binary-kitchen.net
yttrium.binary-kitchen.net yttrium.binary-kitchen.net
zirconium.binary-kitchen.net

View File

@ -0,0 +1,7 @@
---
- name: Restart nginx
service: name=nginx state=restarted
- name: Run acertmgr
command: /opt/acertmgr/acertmgr.py

View File

@ -0,0 +1,5 @@
---
dependencies:
- { role: acertmgr }
- { role: nginx, nginx_ssl: True }

View File

@ -0,0 +1,17 @@
---
- name: Ensure jitsi certificates are available
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/{{ jitsi_domain }}.key -out /etc/nginx/ssl/{{ jitsi_domain }}.crt -days 730 -subj "/CN={{ jitsi_domain }}" creates=/etc/nginx/ssl/{{ jitsi_domain }}.crt
notify: Restart nginx
- name: Configure certificate manager
template: src=certs.j2 dest=/etc/acertmgr/{{ jitsi_domain }}.conf
notify: Run acertmgr
- name: Configure vhosts
template: src=vhost.j2 dest=/etc/nginx/sites-available/jitsi
notify: Restart nginx
- name: Enable vhosts
file: src=/etc/nginx/sites-available/jitsi dest=/etc/nginx/sites-enabled/jitsi state=link
notify: Restart nginx

View File

@ -0,0 +1,14 @@
---
{{ jitsi_domain }}:
- path: /etc/nginx/ssl/{{ jitsi_domain }}.crt
user: root
group: root
perm: '400'
format: crt,ca
action: '/usr/sbin/service nginx restart'
- path: /etc/nginx/ssl/{{ jitsi_domain }}.key
user: root
group: root
perm: '400'
format: key
action: '/usr/sbin/service nginx restart'

View File

@ -0,0 +1,27 @@
server {
listen 80;
listen [::]:80;
server_name {{ jitsi_domain }};
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
return 301 https://{{ jitsi_domain }}$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ jitsi_domain }};
ssl_certificate_key /etc/nginx/ssl/{{ jitsi_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ jitsi_domain }}.crt;
root /var/www/jitsi;
}

View File

@ -8,7 +8,7 @@
- root-keys - root-keys
- name: Setup unattended updates - name: Setup unattended updates
hosts: [sulis.binary.kitchen, nabia.binary.kitchen, beryllium.binary-kitchen.net, boron.binary-kitchen.net, carbon.binary-kitchen.net, nitrogen.binary-kitchen.net, oxygen.binary-kitchen.net, fluorine.binary-kitchen.net, krypton.binary-kitchen.net, sodium.binary-kitchen.net, yttrium.binary-kitchen.net] hosts: [sulis.binary.kitchen, nabia.binary.kitchen, beryllium.binary-kitchen.net, boron.binary-kitchen.net, carbon.binary-kitchen.net, nitrogen.binary-kitchen.net, oxygen.binary-kitchen.net, fluorine.binary-kitchen.net, krypton.binary-kitchen.net, sodium.binary-kitchen.net, yttrium.binary-kitchen.net, zirconium.binary-kitchen.net]
roles: roles:
- uau - uau
@ -88,3 +88,8 @@
hosts: krypton.binary-kitchen.net hosts: krypton.binary-kitchen.net
roles: roles:
- partdb - partdb
- name: Setup jitsi server
hosts: zirconium.binary-kitchen.net
roles:
- jitsi