[mod] role:gitlab

This commit is contained in:
roydfalk 2024-03-20 21:09:38 +01:00
parent 5a19718c62
commit 3dbb54059c
3 changed files with 28 additions and 1 deletions

View file

@ -1,5 +1,11 @@
{ {
"var_gitlab_domain": "gitlab.example.org", "var_gitlab_domain": "gitlab.example.org",
"var_gitlab_database_kind": "internal",
"var_gitlab_database_data_postgresql_host": "localhost",
"var_gitlab_database_data_postgresql_port": 5432,
"var_gitlab_database_data_postgresql_username": "gitlab_user",
"var_gitlab_database_data_postgresql_password": "REPLACE_ME",
"var_gitlab_database_data_postgresql_schema": "gitlab",
"var_gitlab_authentication_kind": "internal", "var_gitlab_authentication_kind": "internal",
"var_gitlab_authentication_data_authelia_url_base": "https://authelia.example.org", "var_gitlab_authentication_data_authelia_url_base": "https://authelia.example.org",
"var_gitlab_authentication_data_authelia_client_id": "gitlab", "var_gitlab_authentication_data_authelia_client_id": "gitlab",

View file

@ -1338,9 +1338,22 @@ gitlab_rails['omniauth_providers'] = [
###! By default, reconfigure reloads postgresql if it is running. If you ###! By default, reconfigure reloads postgresql if it is running. If you
###! change any of these settings, be sure to run `gitlab-ctl restart postgresql` ###! change any of these settings, be sure to run `gitlab-ctl restart postgresql`
###! after reconfigure in order for the changes to take effect. ###! after reconfigure in order for the changes to take effect.
# postgresql['enable'] = true
{% if var_gitlab_database_kind == 'internal' %}
postgresql['enable'] = true
# postgresql['listen_address'] = nil # postgresql['listen_address'] = nil
# postgresql['port'] = 5432 # postgresql['port'] = 5432
{% endif %}
{% if var_gitlab_database_kind == 'postgresql' %}
postgresql['enable'] = false
gitlab_rails['db_adapter'] = 'postgresql'
gitlab_rails['db_encoding'] = 'utf8'
gitlab_rails['db_host'] = '{{var_gitlab_database_data_postgresql_host}}'
gitlab_rails['db_port'] = {{var_gitlab_database_data_postgresql_port | string}}
gitlab_rails['db_username'] = '{{var_gitlab_database_data_postgresql_username}}'
gitlab_rails['db_password'] = '{{var_gitlab_database_data_postgresql_password}}'
{% endif %}
## Only used when Patroni is enabled. This is the port that PostgreSQL responds to other ## Only used when Patroni is enabled. This is the port that PostgreSQL responds to other
## cluster members. This port is used by Patroni to advertize the PostgreSQL connection ## cluster members. This port is used by Patroni to advertize the PostgreSQL connection

View file

@ -3,6 +3,14 @@
"type": "string", "type": "string",
"mandatory": false "mandatory": false
}, },
"database_kind": {
"type": "string",
"mandatory": false,
"options": [
"internal",
"postgresql"
]
},
"authentication_kind": { "authentication_kind": {
"type": "string", "type": "string",
"mandatory": false, "mandatory": false,