ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit ce2062e0a7ee9ad581f632cfe251dea56bff887d
parent 007e89b151151965014fd54c8278cb99c4cb3612
Author: Leah (ctucx) <leah@ctu.cx>
Date: Mon, 16 Nov 2020 20:20:47 +0100

websites: add repo.f2k1.de
3 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/config-files/website-vhosts/repo.f2k1.de.conf b/config-files/website-vhosts/repo.f2k1.de.conf
@@ -0,0 +1,15 @@
+server {
+	listen 443 ssl;
+	listen [::]:443 ssl;
+
+	ssl_certificate "/var/lib/acme-redirect/live/repo.f2k1.de/fullchain";
+	ssl_certificate_key "/var/lib/acme-redirect/live/repo.f2k1.de/privkey";
+	include /etc/nginx/ssl.conf;
+	
+	server_name repo.f2k1.de;
+
+	location / {
+		proxy_set_header Host archrepo.frp.ctu.cx;
+		proxy_pass http://127.0.0.1:8088;
+	}
+}
diff --git a/roles/websites/tasks/main.yml b/roles/websites/tasks/main.yml
@@ -4,6 +4,11 @@
     - install_ctu.cx
   when: network.hostname == "wanderduene"
 
+- include: repo.f2k1.de.yml
+  tags:
+    - install_repo.f2k1.de
+  when: network.hostname == "wanderduene"
+
 - include: photos.ctu.cx.yml
   tags:
     - install_photos.ctu.cx
diff --git a/roles/websites/tasks/repo.f2k1.de.yml b/roles/websites/tasks/repo.f2k1.de.yml
@@ -0,0 +1,14 @@
+---
+
+- name: copy vhost for repo.f2k1.de into place
+  copy:
+    src: config-files/website-vhosts/repo.f2k1.de.conf
+    dest: /etc/nginx/conf.d/repo.f2k1.de.conf
+    mode: 0644
+    owner: nginx
+    group: nginx
+
+- name: restart nginx
+  service:
+    name: nginx
+    state: restarted