From 373b2190315fa3c823775aaeab23172e20d12616 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 11 Aug 2023 00:39:55 +0200 Subject: [PATCH] Migrate Engelsystem from ThinkCCCluster to Chaosknoten --- .../{z9 => chaosknoten}/host_vars/engelsystem.yaml | 4 ++-- inventories/chaosknoten/hosts.yaml | 7 +++++++ inventories/z9/hosts.yaml | 8 -------- .../configs/engelsystem/nginx/aes.ccchh.net.conf | 2 +- .../public-reverse-proxy/nginx/acme_challenge.conf | 1 + .../configs/public-reverse-proxy/nginx/nginx.conf | 1 + .../configs/engelsystem/compose.yaml.j2 | 0 7 files changed, 12 insertions(+), 11 deletions(-) rename inventories/{z9 => chaosknoten}/host_vars/engelsystem.yaml (63%) rename playbooks/files/{z9 => chaosknoten}/configs/engelsystem/nginx/aes.ccchh.net.conf (98%) rename playbooks/templates/{z9 => chaosknoten}/configs/engelsystem/compose.yaml.j2 (100%) diff --git a/inventories/z9/host_vars/engelsystem.yaml b/inventories/chaosknoten/host_vars/engelsystem.yaml similarity index 63% rename from inventories/z9/host_vars/engelsystem.yaml rename to inventories/chaosknoten/host_vars/engelsystem.yaml index dcdf779..3ce1a78 100644 --- a/inventories/z9/host_vars/engelsystem.yaml +++ b/inventories/chaosknoten/host_vars/engelsystem.yaml @@ -1,4 +1,4 @@ -docker_compose__compose_file_content: "{{ lookup('ansible.builtin.template', 'z9/configs/engelsystem/compose.yaml.j2') }}" +docker_compose__compose_file_content: "{{ lookup('ansible.builtin.template', 'chaosknoten/configs/engelsystem/compose.yaml.j2') }}" docker_compose__configuration_files: [] certbot__version_spec: "" @@ -9,4 +9,4 @@ certbot__certificate_domains: nginx__version_spec: "" nginx__configurations: - name: aes.ccchh.net - content: "{{ lookup('ansible.builtin.file', 'z9/configs/engelsystem/nginx/aes.ccchh.net.conf') }}" + content: "{{ lookup('ansible.builtin.file', 'chaosknoten/configs/engelsystem/nginx/aes.ccchh.net.conf') }}" diff --git a/inventories/chaosknoten/hosts.yaml b/inventories/chaosknoten/hosts.yaml index df0bebb..765baa8 100644 --- a/inventories/chaosknoten/hosts.yaml +++ b/inventories/chaosknoten/hosts.yaml @@ -5,6 +5,7 @@ all: cloud: pad: keycloak: + engelsystem: debian_12: hosts: cloud: @@ -25,11 +26,16 @@ all: ansible_host: keycloak-intern.hamburg.ccc.de ansible_user: chaos ansible_ssh_common_args: -J ssh://public-reverse-proxy.hamburg.ccc.de:42666 + engelsystem: + ansible_host: aes-intern.hamburg.ccc.de + ansible_user: chaos + ansible_ssh_common_args: -J ssh://public-reverse-proxy.hamburg.ccc.de:42666 docker_compose_hosts: hosts: cloud: pad: keycloak: + engelsystem: nextcloud_hosts: hosts: cloud: @@ -39,6 +45,7 @@ all: pad: public-reverse-proxy: keycloak: + engelsystem: public_reverse_proxy_hosts: hosts: public-reverse-proxy: diff --git a/inventories/z9/hosts.yaml b/inventories/z9/hosts.yaml index 2467b47..fb5f55e 100644 --- a/inventories/z9/hosts.yaml +++ b/inventories/z9/hosts.yaml @@ -29,9 +29,6 @@ all: mailserver-endpoint: ansible_host: mailserver-endpoint.ccchh.net ansible_user: chaos - engelsystem: - ansible_host: engelsystem.z9.ccchh.net - ansible_user: chaos debian_12: hosts: public-reverse-proxy: @@ -44,7 +41,6 @@ all: zigbee2mqtt: light: wiki: - engelsystem: public_reverse_proxy_hosts: hosts: public-reverse-proxy: @@ -55,15 +51,11 @@ all: esphome: zigbee2mqtt: wiki: - engelsystem: ssh_server_config_hosts: hosts: public-reverse-proxy: wiki: mailserver-endpoint: - docker_compose_hosts: - hosts: - engelsystem: esphome_hosts: hosts: esphome: diff --git a/playbooks/files/z9/configs/engelsystem/nginx/aes.ccchh.net.conf b/playbooks/files/chaosknoten/configs/engelsystem/nginx/aes.ccchh.net.conf similarity index 98% rename from playbooks/files/z9/configs/engelsystem/nginx/aes.ccchh.net.conf rename to playbooks/files/chaosknoten/configs/engelsystem/nginx/aes.ccchh.net.conf index a572833..937bdb7 100644 --- a/playbooks/files/z9/configs/engelsystem/nginx/aes.ccchh.net.conf +++ b/playbooks/files/chaosknoten/configs/engelsystem/nginx/aes.ccchh.net.conf @@ -7,7 +7,7 @@ server { # $remote_port to the client address and client port, when using proxy # protocol. # First set our proxy protocol proxy as trusted. - set_real_ip_from 10.31.206.14; + set_real_ip_from 172.31.17.140; # Then tell the realip_module to get the addreses from the proxy protocol # header. real_ip_header proxy_protocol; diff --git a/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/acme_challenge.conf b/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/acme_challenge.conf index 38a0d67..25dad73 100644 --- a/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/acme_challenge.conf +++ b/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/acme_challenge.conf @@ -3,6 +3,7 @@ map $host $upstream_acme_challenge_host { pad.hamburg.ccc.de pad-intern.hamburg.ccc.de:31820; id.hamburg.ccc.de 172.31.17.144:31820; keycloak-admin.hamburg.ccc.de 172.31.17.144:31820; + aes.ccchh.net 172.31.17.145:31820; default ""; } diff --git a/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/nginx.conf b/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/nginx.conf index 5773711..7f4fde7 100644 --- a/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/nginx.conf +++ b/playbooks/files/chaosknoten/configs/public-reverse-proxy/nginx/nginx.conf @@ -22,6 +22,7 @@ stream { pad.hamburg.ccc.de pad-intern.hamburg.ccc.de:8443; id.hamburg.ccc.de 172.31.17.144:8443; keycloak-admin.hamburg.ccc.de 172.31.17.144:8444; + aes.ccchh.net 172.31.17.145:8443; } server { diff --git a/playbooks/templates/z9/configs/engelsystem/compose.yaml.j2 b/playbooks/templates/chaosknoten/configs/engelsystem/compose.yaml.j2 similarity index 100% rename from playbooks/templates/z9/configs/engelsystem/compose.yaml.j2 rename to playbooks/templates/chaosknoten/configs/engelsystem/compose.yaml.j2