new host: argentum.binary-kitchen.net (event web)

This commit is contained in:
Markus 2023-11-07 16:49:13 +01:00
parent d10886f284
commit 22c743baec
8 changed files with 93 additions and 1 deletions

View File

@ -0,0 +1,4 @@
---
root_keys_host:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICyGAePGA47K+VNFcKdvcQG3xM3ywcnrVtUD7wPrIin1 christoph"

1
hosts
View File

@ -36,4 +36,5 @@ molybdenum.binary-kitchen.net
ruthenium.binary-kitchen.net
rhodium.binary-kitchen.net
palladium.binary-kitchen.net
argentum.binary-kitchen.net
barium.binary-kitchen.net

View File

@ -0,0 +1,15 @@
---
eh2x.binary-kitchen.de:
- path: /etc/nginx/ssl/eh2x.binary-kitchen.de.crt
user: root
group: root
perm: '400'
format: crt,ca
action: '/usr/sbin/service nginx restart'
- path: /etc/nginx/ssl/eh2x.binary-kitchen.de.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 eh2x.binary-kitchen.de;
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
return 301 https://eh2x.binary-kitchen.de$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name eh2x.binary-kitchen.de;
ssl_certificate_key /etc/nginx/ssl/eh2x.binary-kitchen.de.key;
ssl_certificate /etc/nginx/ssl/eh2x.binary-kitchen.de.crt;
root /var/www/eh2x;
}

View File

@ -0,0 +1,7 @@
---
- name: Restart nginx
service: name=nginx state=restarted
- name: Run acertmgr
command: /usr/bin/acertmgr

View File

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

View File

@ -0,0 +1,28 @@
---
- name: Install dependencies
apt:
name:
- php-fpm
- name: Create vhost directory
file: path=/var/www/eh2x state=directory owner=www-data group=www-data
- name: Ensure certificates are available
command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/eh2x.binary-kitchen.de.key -out /etc/nginx/ssl/eh2x.binary-kitchen.de.crt -days 730 -subj "/CN=eh2x.binary-kitchen.de" creates=/etc/nginx/ssl/eh2x.binary-kitchen.de.crt
notify: Restart nginx
#- name: Configure certificate manager
# copy: src=certs dest=/etc/acertmgr/eh2x.binary-kitchen.de.conf
# notify: Run acertmgr
- name: Configure vhosts
copy: src=vhost dest=/etc/nginx/sites-available/www
notify: Restart nginx
- name: Enable vhosts
file: src=/etc/nginx/sites-available/www dest=/etc/nginx/sites-enabled/www state=link
notify: Restart nginx
- name: Start php8.2-fpm
service: name=php8.2-fpm state=started enabled=yes

View File

@ -7,7 +7,7 @@
- root_keys
- name: Setup unattended updates
hosts: [sulis.binary.kitchen, nabia.binary.kitchen, epona.binary.kitchen, pizza.binary.kitchen, pancake.binary.kitchen, knoedel.binary.kitchen, bob.binary.kitchen, lasagne.binary.kitchen, tschunk.binary.kitchen, bowle.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, neon.binary-kitchen.net, sodium.binary-kitchen.net, magnesium.binary-kitchen.net, krypton.binary-kitchen.net, yttrium.binary-kitchen.net, zirconium.binary-kitchen.net, molybdenum.binary-kitchen.net, ruthenium.binary-kitchen.net, rhodium.binary-kitchen.net, palladium.binary-kitchen.net, barium.binary-kitchen.net]
hosts: [sulis.binary.kitchen, nabia.binary.kitchen, epona.binary.kitchen, pizza.binary.kitchen, pancake.binary.kitchen, knoedel.binary.kitchen, bob.binary.kitchen, lasagne.binary.kitchen, tschunk.binary.kitchen, bowle.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, neon.binary-kitchen.net, sodium.binary-kitchen.net, magnesium.binary-kitchen.net, krypton.binary-kitchen.net, yttrium.binary-kitchen.net, zirconium.binary-kitchen.net, molybdenum.binary-kitchen.net, ruthenium.binary-kitchen.net, rhodium.binary-kitchen.net, palladium.binary-kitchen.net, argentum.binary-kitchen.net, barium.binary-kitchen.net]
roles:
- uau
@ -149,6 +149,11 @@
roles:
- pretalx
- name: Setup event web host
hosts: argentum.binary-kitchen.net
roles:
- event_web
- name: Setup WorkAdventure host
hosts: barium.binary-kitchen.net
roles: