From b387856657bf67e14b36dcf8dede018568ac7aff Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Sat, 11 Mar 2023 23:42:05 +0100 Subject: [PATCH] =?UTF-8?q?[FIX]=20pr=C3=BCfe=20parent=20key=20in=20vault?= =?UTF-8?q?=20variablen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/environment.env.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/environment.env.j2 b/templates/environment.env.j2 index f4c8543..95eb02f 100644 --- a/templates/environment.env.j2 +++ b/templates/environment.env.j2 @@ -26,9 +26,11 @@ GITEA__database__NAME={{ gitea_vars.database.name }} {% if 'user' in gitea_vars['database'] %} GITEA__database__USER={{ gitea_vars.database.user }} {% endif %} +{% if 'database' in vault[inventory_hostname]['gitea'] %} {% if 'passwd' in vault[inventory_hostname]['gitea']['database'] %} GITEA__database__PASSWD={{ vault[inventory_hostname]['gitea']['database']['passwd'] }} {% endif %} +{% endif %} {% if 'schema' in gitea_vars['database'] %} GITEA__database__SCHEMA={{ gitea_vars.database.schema }} {% endif %} @@ -119,9 +121,11 @@ GITEA__mailer__ENABLE_HELO={{ gitea_vars.mailer.enable_helo }} {% if 'user' in gitea_vars['mailer'] %} GITEA__mailer__USER={{ gitea_vars.mailer.user }} {% endif %} +{% if 'mailer' in vault[inventory_hostname]['gitea'] %} {% if 'passwd' in vault[inventory_hostname]['gitea']['mailer'] %} GITEA__mailer__PASSWD={{ vault[inventory_hostname]['gitea']['mailer']['passwd'] }} {% endif %} +{% endif %} {% endif %} {# /mailer #} {% if 'repository' in gitea_vars %} @@ -164,9 +168,11 @@ GITEA__attachment__MINIO_ENDPOINT={{ gitea_vars.attachment.minio_endpoint }} {% if 'minio_access_key_id' in gitea_vars['attachment'] %} GITEA__attachment__MINIO_ACCESS_KEY_ID={{ gitea_vars.attachment.minio_access_key_id }} {% endif %} +{% if 'attachment' in vault[inventory_hostname]['gitea'] %} {% if 'minio_secret_access_key' in vault[inventory_hostname]['gitea']['attachment'] %} GITEA__attachment__MINIO_SECRET_ACCESS_KEY={{ vault[inventory_hostname]['gitea']['attachment']['minio_secret_access_key'] }} {% endif %} +{% endif %} {% if 'minio_bucket' in gitea_vars['attachment'] %} GITEA__attachment__MINIO_BUCKET={{ gitea_vars.attachment.minio_bucket }} {% endif %} @@ -223,9 +229,11 @@ GITEA__ssh.minimum_key_sizes__DSA={{ gitea_vars.ssh.minimum_key_sizes.dsa }} {% if 'install_lock' in gitea_vars['security'] %} GITEA__security__INSTALL_LOCK={{ gitea_vars.security.install_lock }} {% endif %} +{% if 'security' in vault[inventory_hostname]['gitea'] %} {% if 'secret_key' in vault[inventory_hostname]['gitea']['security'] %} GITEA__security__SECRET_KEY={{ vault[inventory_hostname]['gitea']['security']['secret_key'] }} {% endif %} +{% endif %} {% if 'secret_key_uri' in gitea_vars['security'] %} GITEA__security__SECRET_KEY_URI={{ gitea_vars.security.secret_key_uri }} {% endif %}