[FIX] prüfe parent key in vault variablen

This commit is contained in:
Marius Alwan Meyer 2023-03-11 23:42:05 +01:00
parent c5319d26b2
commit b387856657

View File

@ -26,9 +26,11 @@ GITEA__database__NAME={{ gitea_vars.database.name }}
{% if 'user' in gitea_vars['database'] %} {% if 'user' in gitea_vars['database'] %}
GITEA__database__USER={{ gitea_vars.database.user }} GITEA__database__USER={{ gitea_vars.database.user }}
{% endif %} {% endif %}
{% if 'database' in vault[inventory_hostname]['gitea'] %}
{% if 'passwd' in vault[inventory_hostname]['gitea']['database'] %} {% if 'passwd' in vault[inventory_hostname]['gitea']['database'] %}
GITEA__database__PASSWD={{ vault[inventory_hostname]['gitea']['database']['passwd'] }} GITEA__database__PASSWD={{ vault[inventory_hostname]['gitea']['database']['passwd'] }}
{% endif %} {% endif %}
{% endif %}
{% if 'schema' in gitea_vars['database'] %} {% if 'schema' in gitea_vars['database'] %}
GITEA__database__SCHEMA={{ gitea_vars.database.schema }} GITEA__database__SCHEMA={{ gitea_vars.database.schema }}
{% endif %} {% endif %}
@ -119,9 +121,11 @@ GITEA__mailer__ENABLE_HELO={{ gitea_vars.mailer.enable_helo }}
{% if 'user' in gitea_vars['mailer'] %} {% if 'user' in gitea_vars['mailer'] %}
GITEA__mailer__USER={{ gitea_vars.mailer.user }} GITEA__mailer__USER={{ gitea_vars.mailer.user }}
{% endif %} {% endif %}
{% if 'mailer' in vault[inventory_hostname]['gitea'] %}
{% if 'passwd' in vault[inventory_hostname]['gitea']['mailer'] %} {% if 'passwd' in vault[inventory_hostname]['gitea']['mailer'] %}
GITEA__mailer__PASSWD={{ vault[inventory_hostname]['gitea']['mailer']['passwd'] }} GITEA__mailer__PASSWD={{ vault[inventory_hostname]['gitea']['mailer']['passwd'] }}
{% endif %} {% endif %}
{% endif %}
{% endif %} {# /mailer #} {% endif %} {# /mailer #}
{% if 'repository' in gitea_vars %} {% 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'] %} {% if 'minio_access_key_id' in gitea_vars['attachment'] %}
GITEA__attachment__MINIO_ACCESS_KEY_ID={{ gitea_vars.attachment.minio_access_key_id }} GITEA__attachment__MINIO_ACCESS_KEY_ID={{ gitea_vars.attachment.minio_access_key_id }}
{% endif %} {% endif %}
{% if 'attachment' in vault[inventory_hostname]['gitea'] %}
{% if 'minio_secret_access_key' in vault[inventory_hostname]['gitea']['attachment'] %} {% 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'] }} GITEA__attachment__MINIO_SECRET_ACCESS_KEY={{ vault[inventory_hostname]['gitea']['attachment']['minio_secret_access_key'] }}
{% endif %} {% endif %}
{% endif %}
{% if 'minio_bucket' in gitea_vars['attachment'] %} {% if 'minio_bucket' in gitea_vars['attachment'] %}
GITEA__attachment__MINIO_BUCKET={{ gitea_vars.attachment.minio_bucket }} GITEA__attachment__MINIO_BUCKET={{ gitea_vars.attachment.minio_bucket }}
{% endif %} {% 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'] %} {% if 'install_lock' in gitea_vars['security'] %}
GITEA__security__INSTALL_LOCK={{ gitea_vars.security.install_lock }} GITEA__security__INSTALL_LOCK={{ gitea_vars.security.install_lock }}
{% endif %} {% endif %}
{% if 'security' in vault[inventory_hostname]['gitea'] %}
{% if 'secret_key' in vault[inventory_hostname]['gitea']['security'] %} {% if 'secret_key' in vault[inventory_hostname]['gitea']['security'] %}
GITEA__security__SECRET_KEY={{ vault[inventory_hostname]['gitea']['security']['secret_key'] }} GITEA__security__SECRET_KEY={{ vault[inventory_hostname]['gitea']['security']['secret_key'] }}
{% endif %} {% endif %}
{% endif %}
{% if 'secret_key_uri' in gitea_vars['security'] %} {% if 'secret_key_uri' in gitea_vars['security'] %}
GITEA__security__SECRET_KEY_URI={{ gitea_vars.security.secret_key_uri }} GITEA__security__SECRET_KEY_URI={{ gitea_vars.security.secret_key_uri }}
{% endif %} {% endif %}