From ecf68bd0cf48e31b2ef409e0d747d621c9343fa8 Mon Sep 17 00:00:00 2001 From: Mark Janssen -- Sig-I/O Automatisering Date: Thu, 18 Jul 2024 22:00:48 +0200 Subject: [PATCH] nginx role for git + music --- bitlair.yaml | 1 + git.yaml | 7 ++-- group_vars/git.yaml | 10 +++++ group_vars/music.yaml | 2 + roles/mqtt-internal/tasks/main.yaml | 58 ++++++++++++++--------------- roles/nginx/defaults/main.yaml | 1 + roles/nginx/templates/site.conf.j2 | 2 + snippets/forgejo-nginx.j2 | 3 ++ 8 files changed, 51 insertions(+), 33 deletions(-) create mode 100644 snippets/forgejo-nginx.j2 diff --git a/bitlair.yaml b/bitlair.yaml index be65660..1eed26c 100644 --- a/bitlair.yaml +++ b/bitlair.yaml @@ -26,6 +26,7 @@ - hosts: git roles: - { role: "acme", tags: [ "acme" ] } + - { role: "nginx", tags: [ "nginx" ] } - { role: "git-server", tags: [ "git-server" ] } - hosts: monitoring diff --git a/git.yaml b/git.yaml index 2161a4c..0ae1811 100644 --- a/git.yaml +++ b/git.yaml @@ -2,6 +2,7 @@ - hosts: git roles: - - common - - acme - - git-server + - { role: "common", tags: [ "common" ] } + - { role: "acme", tags: [ "acme" ] } + - { role: "nginx", tags: [ "nginx" ] } + - { role: "git-server", tags: [ "git-server" ] } diff --git a/group_vars/git.yaml b/group_vars/git.yaml index ed549a9..dd039b3 100644 --- a/group_vars/git.yaml +++ b/group_vars/git.yaml @@ -1,5 +1,15 @@ +--- + acme_domains: - "{{ git_server_domain }}" git_server_domain: git.bitlair.nl git_server_title: Gitlair git_server_bootstrap_cert: no + +nginx_client_max_body_size: 4G + +nginx_sites: + - server_name: "git.bitlair.nl" + localproxy: "9001" + snippets: + - "forgejo-nginx.j2" diff --git a/group_vars/music.yaml b/group_vars/music.yaml index ee9235b..8acdf4e 100644 --- a/group_vars/music.yaml +++ b/group_vars/music.yaml @@ -5,6 +5,8 @@ root_access: - foobar - polyfloyd +nginx_client_max_body_size: 512M + music_domain: music.bitlair.nl acme_san_domains: - [ music.bitlair.nl ] diff --git a/roles/mqtt-internal/tasks/main.yaml b/roles/mqtt-internal/tasks/main.yaml index 371671c..89f9064 100644 --- a/roles/mqtt-internal/tasks/main.yaml +++ b/roles/mqtt-internal/tasks/main.yaml @@ -1,34 +1,32 @@ --- -- name: mqtt-internal - tags: mqtt_internal - block: - - name: Install dependencies - ansible.builtin.apt: - name: - - mosquitto - - avahi-daemon - - name: Install bambulab cafile - # openssl s_client -showcerts -connect :8883 :8883