ansible-role-gitea/templates/environment.env.j2

305 lines
13 KiB
Plaintext
Raw Permalink Normal View History

2022-11-11 17:52:53 +01:00
2023-03-09 11:28:17 +01:00
# ANSIBLE-MANAGED
#
# -- Diese Datei wird via Ansible verwaltet und automatisch überschrieben!
# https://azubi-gitea.int.sernet.de/mmeyer/ansible-role-gitea/src/branch/main/templates/environment.env.j2
2022-11-11 17:52:53 +01:00
USER_UID={{ git_user.uid }}
USER_GID={{ git_user.group }}
2023-03-24 17:11:21 +01:00
USER={{ git_user.name }}
GITEA__APP_NAME={{ gitea_vars.app_name }}
2022-11-11 17:52:53 +01:00
GITEA__RUN_USER={{ git_user.name }}
2023-04-01 14:43:53 +02:00
GITEA__server__ROOT_URL=https://{{ gitea.hostname }}.{{ gitea.domain }}/
GITEA__server__Domain={{ gitea.hostname }}.{{ gitea.domain }}
2022-11-11 17:52:53 +01:00
GITEA__server__SSH_PORT=22
{% if 'database' in gitea_vars %}
{% if 'db_type' in gitea_vars['database'] %}
GITEA__database__DB_TYPE={{ gitea_vars.database.db_type }}
{% endif %}
{% if 'host' in gitea_vars['database'] %}
GITEA__database__HOST={{ gitea_vars.database.host }}
{% endif %}
{% if 'name' in gitea_vars['database'] %}
GITEA__database__NAME={{ gitea_vars.database.name }}
{% endif %}
{% 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 %}
{% if 'ssl_mode' in gitea_vars['database'] %}
GITEA__database__SSL_MODE={{ gitea_vars.database.ssl_mode }}
{% endif %}
{% if 'sqlite_timeout' in gitea_vars['database'] %}
GITEA__database__SQLITE_TIMEOUT={{ gitea_vars.database.sqlite_timeout }}
{% endif %}
{% if 'sqlite_journal_mode' in gitea_vars['database'] %}
GITEA__database__SQLITE_JOURNAL_MODE={{ gitea_vars.database.sqlite_journal_mode }}
{% endif %}
{% if 'iterate_buffer_size' in gitea_vars['database'] %}
GITEA__database__ITERATE_BUFFER_SIZE={{ gitea_vars.database.iterate_buffer_size }}
{% endif %}
{% if 'path' in gitea_vars['database'] %}
GITEA__database__PATH={{ gitea_vars.database.path }}
{% endif %}
{% if 'log_sql' in gitea_vars['database'] %}
GITEA__database__ABC={{ gitea_vars.database.abc }}
{% endif %}
{% if 'db_retries' in gitea_vars['database'] %}
GITEA__database__DB_RETRIES={{ gitea_vars.database.db_retries }}
{% endif %}
{% if 'db_retry_backoff' in gitea_vars['database'] %}
GITEA__database__DB_RETRY_BACKOFF={{ gitea_vars.database.db_retry_backoff }}
{% endif %}
{% if 'max_open_conns' in gitea_vars['database'] %}
GITEA__database__MAX_OPEN_CONNS={{ gitea_vars.database.max_open_conns }}
{% endif %}
{% if 'max_idle_conns' in gitea_vars['database'] %}
GITEA__database__MAX_IDLE_CONNS={{ gitea_vars.database.max_idle_conns }}
{% endif %}
{% if 'conn_max_lifetime' in gitea_vars['database'] %}
GITEA__database__CONN_MAX_LIFETIME={{ gitea_vars.database.conn_max_lifetime }}
{% endif %}
{% if 'auto_migration' in gitea_vars['database'] %}
GITEA__database__AUTO_MIGRATION={{ gitea_vars.database.auto_migration }}
{% endif %}
{% endif %} {# /database #}
{% if 'service' in gitea_vars %}
{% if 'disable_registration' in gitea_vars['service'] %}
GITEA__service__DISABLE_REGISTRATION={{ gitea_vars.service.disable_registration }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'require_signin_view' in gitea_vars['service'] %}
GITEA__service__REQUIRE_SIGNIN_VIEW={{ gitea_vars.service.require_signin_view }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'register_email_confirm' in gitea_vars['service'] %}
GITEA__service__REGISTER_EMAIL_CONFIRM={{ gitea_vars.service.register_email_confirm }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'enable_notify_mail' in gitea_vars['service'] %}
GITEA__service__ENABLE_NOTIFY_MAIL={{ gitea_vars.service.enable_notify_mail }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'default_keep_email_private' in gitea_vars['service'] %}
GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE={{ gitea_vars.service.default_keep_email_private }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'default_allow_create_organization' in gitea_vars['service'] %}
2023-05-01 17:14:00 +02:00
GITEA__service__DEFAULT_ALLOW_CREATE_ORGANIZATION={{ gitea_vars.service.default_allow_create_organization }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'default_enable_timetracking' in gitea_vars['service'] %}
GITEA__service__DEFAULT_ENABLE_TIMETRACKING={{ gitea_vars.service.default_enable_timetracking }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% endif %} {# /service #}
{% if 'mailer' in gitea_vars %}
{% if 'enabled' in gitea_vars['mailer'] %}
GITEA__mailer__ENABLED={{ gitea_vars.mailer.enabled }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'from' in gitea_vars['mailer'] %}
GITEA__mailer__FROM={{ gitea_vars.mailer.from }}
2022-11-11 17:52:53 +01:00
{% endif %}
2023-03-11 19:56:56 +01:00
{% if 'protocol' in gitea_vars['mailer'] %}
GITEA__mailer__PROTOCOL={{ gitea_vars.mailer.protocol }}
{% endif %}
{% if 'smtp_addr' in gitea_vars['mailer'] %}
GITEA__mailer__SMTP_ADDR={{ gitea_vars.mailer.smtp_addr }}
{% endif %}
{% if 'smtp_port' in gitea_vars['mailer'] %}
GITEA__mailer__SMTP_PORT={{ gitea_vars.mailer.smtp_port }}
{% endif %}
{% if 'enable_helo' in gitea_vars['mailer'] %}
GITEA__mailer__ENABLE_HELO={{ gitea_vars.mailer.enable_helo }}
{% endif %}
{% if 'user' in gitea_vars['mailer'] %}
GITEA__mailer__USER={{ gitea_vars.mailer.user }}
{% endif %}
{% if 'mailer' in vault[inventory_hostname]['gitea'] %}
2023-03-11 23:28:36 +01:00
{% if 'passwd' in vault[inventory_hostname]['gitea']['mailer'] %}
GITEA__mailer__PASSWD={{ vault[inventory_hostname]['gitea']['mailer']['passwd'] }}
{% endif %}
{% endif %}
2022-11-11 17:52:53 +01:00
{% endif %} {# /mailer #}
{% if 'repository' in gitea_vars %}
{% if 'enable_push_create_user' in gitea_vars['repository']%}
GITEA__repository__ENABLE_PUSH_CREATE_USER={{ gitea_vars.repository.enable_push_create_user }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'enable_push_create_org' in gitea_vars['repository']%}
GITEA__repository__ENABLE_PUSH_CREATE_ORG={{ gitea_vars.repository.enable_push_create_org }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'default_push_create_private' in gitea_vars['repository']%}
GITEA__repository__DEFAULT_PUSH_CREATE_PRIVATE={{ gitea_vars.repository.default_push_create_private }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% endif %} {# /repository #}
{% if 'attachment' in gitea_vars %}
{% if 'enabled' in gitea_vars['attachment'] %}
GITEA__attachment__ENABLED={{ gitea_vars.attachment.enabled }}
{% endif %}
{% if 'allowed_types' in gitea_vars['attachment'] %}
GITEA__attachment__ALLOWED_TYPES={{ gitea_vars.attachment.allowed_types }}
{% endif %}
{% if 'max_size' in gitea_vars['attachment'] %}
GITEA__attachment__MAX_SIZE={{ gitea_vars.attachment.max_size }}
{% endif %}
{% if 'max_files' in gitea_vars['attachment'] %}
GITEA__attachment__MAX_FILES={{ gitea_vars.attachment.max_files }}
{% endif %}
{% if 'storage_type' in gitea_vars['attachment'] %}
GITEA__attachment__STORAGE_TYPE={{ gitea_vars.attachment.storage_type }}
{% endif %}
{% if 'serve_direct' in gitea_vars['attachment'] %}
GITEA__attachment__SERVE_DIRECT={{ gitea_vars.attachment.serve_direct }}
{% endif %}
{% if 'path' in gitea_vars['attachment'] %}
GITEA__attachment__PATH={{ gitea_vars.attachment.path }}
{% endif %}
{% if 'minio_endpoint' in gitea_vars['attachment'] %}
GITEA__attachment__MINIO_ENDPOINT={{ gitea_vars.attachment.minio_endpoint }}
{% endif %}
{% 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'] %}
2023-03-11 23:28:36 +01:00
{% 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 %}
{% if 'minio_location' in gitea_vars['attachment'] %}
GITEA__attachment__MINIO_LOCATION={{ gitea_vars.attachment.minio_location }}
{% endif %}
{% if 'minio_base_path' in gitea_vars['attachment'] %}
GITEA__attachment__MINIO_BASE_PATH={{ gitea_vars.attachment.minio_base_path }}
{% endif %}
{% if 'minio_use_ssl' in gitea_vars['attachment'] %}
GITEA__attachment__MINIO_USE_SSL={{ gitea_vars.attachment.minio_use_ssl }}
{% endif %}
{% endif %} {# /attachment #}
2023-03-11 20:08:57 +01:00
{% if 'log' in gitea_vars %}
{% if 'root_path' in gitea_vars['log'] %}
GITEA__log__ROOT_PATH={{ gitea_vars.log.root_path }}
2023-03-11 20:08:57 +01:00
{% endif %}
{% if 'mode' in gitea_vars['log'] %}
GITEA__log__MODE={{ gitea_vars.log.mode }}
2023-03-11 20:08:57 +01:00
{% endif %}
{% if 'level' in gitea_vars['log'] %}
GITEA__log__LEVEL={{ gitea_vars.log.level }}
2023-03-11 20:08:57 +01:00
{% endif %}
{% if 'stacktrace_level' in gitea_vars['log'] %}
GITEA__log__STACKTRACE_LEVEL={{ gitea_vars.log.stacktrace_level }}
2023-03-11 20:08:57 +01:00
{% endif %}
{% if 'enable_log_log' in gitea_vars['log'] %}
GITEA__log__ENABLE_log_LOG={{ gitea_vars.log.enable_log_log }}
2023-03-11 20:08:57 +01:00
{% endif %}
{% if 'enable_xorm_log' in gitea_vars['log'] %}
GITEA__log__ENABLE_XORM_LOG={{ gitea_vars.log.enable_xorm_log }}
2023-03-11 20:08:57 +01:00
{% endif %}
{% endif %} {# /logging#}
{% if 'ssh' in gitea_vars %}
{% if 'minimum_key_sizes' in gitea_vars['ssh'] %}
{% if 'ed25519' in gitea_vars['ssh']['minimum_key_sizes'] %}
GITEA__ssh.minimum_key_sizes__ED25519={{ gitea_vars.ssh.minimum_key_sizes.ed25519 }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'ecdsa' in gitea_vars['ssh']['minimum_key_sizes'] %}
GITEA__ssh.minimum_key_sizes__ECDSA={{ gitea_vars.ssh.minimum_key_sizes.ecdsa }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'rsa' in gitea_vars['ssh']['minimum_key_sizes'] %}
GITEA__ssh.minimum_key_sizes__RSA={{ gitea_vars.ssh.minimum_key_sizes.rsa }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% if 'dsa' in gitea_vars['ssh']['minimum_key_sizes'] %}
GITEA__ssh.minimum_key_sizes__DSA={{ gitea_vars.ssh.minimum_key_sizes.dsa }}
2022-11-11 17:52:53 +01:00
{% endif %}
{% endif %}
2023-03-11 22:51:39 +01:00
{% endif %} {# /ssh #}
{% if 'security' in gitea_vars %}
{% if 'install_lock' in gitea_vars['security'] %}
GITEA__security__INSTALL_LOCK={{ gitea_vars.security.install_lock }}
{% endif %}
{% if 'security' in vault[inventory_hostname]['gitea'] %}
2023-03-11 23:28:36 +01:00
{% if 'secret_key' in vault[inventory_hostname]['gitea']['security'] %}
GITEA__security__SECRET_KEY={{ vault[inventory_hostname]['gitea']['security']['secret_key'] }}
2023-03-11 22:51:39 +01:00
{% endif %}
{% endif %}
2023-03-11 22:51:39 +01:00
{% if 'secret_key_uri' in gitea_vars['security'] %}
GITEA__security__SECRET_KEY_URI={{ gitea_vars.security.secret_key_uri }}
{% endif %}
{% if 'login_remember_days' in gitea_vars['security'] %}
GITEA__security__SECURITYIN_REMEMBER_DAYS={{ gitea_vars.security.login_remember_days }}
{% endif %}
{% if 'cookie_username' in gitea_vars['security'] %}
GITEA__security__COOKIE_USERNAME={{ gitea_vars.security.cookie_username }}
{% endif %}
{% if 'reverse_proxy_authentication_user' in gitea_vars['security'] %}
GITEA__security__REVERSE_PROXY_AUTHENTICATION_USER={{ gitea_vars.security.reverse_proxy_authentication_user }}
{% endif %}
{% if 'reverse_proxy_authentication_email' in gitea_vars['security'] %}
GITEA__security__REVERSE_PROXY_AUTHENTICATION_EMAIL={{ gitea_vars.security.reverse_proxy_authentication_email }}
{% endif %}
{% if 'reverse_proxy_authentication_full_name' in gitea_vars['security'] %}
GITEA__security__REVERSE_PROXY_AUTHENTICATION_FULL_NAME={{ gitea_vars.security.reverse_proxy_authentication_full_name }}
{% endif %}
{% if 'reverse_proxy_limit' in gitea_vars['security'] %}
GITEA__security__REVERSE_PROXY_LIMIT={{ gitea_vars.security.reverse_proxy_limit }}
{% endif %}
{% if 'reverse_proxy_trusted_proxies' in gitea_vars['security'] %}
GITEA__security__REVERSE_PROXY_TRUSTED_PROXIES={{ gitea_vars.security.reverse_proxy_trusted_proxies }}
{% endif %}
{% if 'disable_git_hooks' in gitea_vars['security'] %}
GITEA__security__DISABLE_GIT_HOOKS={{ gitea_vars.security.disable_git_hooks }}
{% endif %}
{% if 'disable_webhooks' in gitea_vars['security'] %}
GITEA__security__DISABLE_WEBHOOKS={{ gitea_vars.security.disable_webhooks }}
{% endif %}
{% if 'only_allow_push_if_gitea_environment_set' in gitea_vars['security'] %}
GITEA__security__ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET={{ gitea_vars.security.only_allow_push_if_gitea_environment_set }}
{% endif %}
{% if 'import_local_paths' in gitea_vars['security'] %}
GITEA__security__IMPORT_LOCAL_PATHS={{ gitea_vars.security.import_local_paths }}
{% endif %}
{% if 'internal_token' in gitea_vars['security'] %}
GITEA__security__INTERNAL_TOKEN={{ gitea_vars.security.internal_token }}
{% endif %}
{% if 'internal_token_uri' in gitea_vars['security'] %}
GITEA__security__INTERNAL_TOKEN_URI={{ gitea_vars.security.internal_token_uri }}
{% endif %}
{% if 'password_hash_algo' in gitea_vars['security'] %}
GITEA__security__PASSWORD_HASH_ALGO={{ gitea_vars.security.password_hash_algo }}
{% endif %}
{% if 'csrf_cookie_http_only' in gitea_vars['security'] %}
GITEA__security__CSRF_COOKIE_HTTP_ONLY={{ gitea_vars.security.csrf_cookie_http_only }}
{% endif %}
{% if 'min_password_length' in gitea_vars['security'] %}
GITEA__security__MIN_PASSWORD_LENGTH={{ gitea_vars.security.min_password_length }}
{% endif %}
{% if 'password_complexity' in gitea_vars['security'] %}
GITEA__security__ABC={{ gitea_vars.security.abc }}
{% endif %}
{% if 'password_check_pwn' in gitea_vars['security'] %}
GITEA__security__PASSWORD_CHECK_PWN={{ gitea_vars.security.password_check_pwn }}
{% endif %}
{% if 'successful_tokens_cache_size' in gitea_vars['security'] %}
GITEA__security__successful_TOKENS_CACHE_SIZE={{ gitea_vars.security.successful_tokens_cache_size }}
{% endif %}
{% endif %} {# /security #}
2023-03-24 17:39:36 +01:00
{% if 'actions' in gitea_vars %}
{% if 'enabled' in gitea_vars['actions'] %}
GITEA__actions__ENABLED={{ gitea_vars.actions.enabled }}
{% endif %}
{% if 'default_actions_url' in gitea_vars['actions'] %}
GITEA__actions__DEFAULT_ACTIONS_URL={{ gitea_vars.actions.default_actions_url }}
{% endif %}
{% endif %} {# /actions #}