Skip to content

Commit 90b14fe

Browse files
committed
Allow users to overwrite gitlab_rails['repositories_storages']
1 parent 6d81ff5 commit 90b14fe

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

roles/gitlab/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,16 @@ gitlab_feature_flags:
216216
enabled: false
217217
```
218218

219+
#### Configure gitlab_rails['repositories_storages'] on your own
220+
221+
If you have the requirement to configure gitlab_rails['repositories_storages']
222+
on your own, set this variable to `false`.
223+
This can be useful if you want to configure multiple Gitaly instances.
224+
225+
```yaml
226+
gitlab_use_default_repositories_storages: true
227+
```
228+
219229
#### Mattermost only use case
220230

221231
This role can be used to run Mattermost without deploying GitLab. In this

roles/gitlab/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ gitlab_secret_token: "changeme"
6464
gitlab_gitaly_instance_ip: "127.0.0.1"
6565
# Port of the Gitaly instance
6666
gitlab_gitaly_instance_port: "8075"
67+
# Set to false to define gitlab_rails['repositories_storages'] on your own
68+
gitlab_use_default_repositories_storages: true
6769

6870
# Whether to use GitLab Omnibus internal PostgreSQL database
6971
gitlab_use_internal_postgresql: "true"

roles/gitlab/templates/gitlab.rb.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ gitaly['configuration'] = {
4545
gitaly['enable'] = false
4646
gitlab_rails['gitaly_token'] = "{{ gitlab_gitaly_token }}"
4747
gitlab_shell['secret_token'] = "{{ gitlab_secret_token }}"
48+
{% if gitlab_use_default_repositories_storages %}
4849
gitlab_rails['repositories_storages'] = {
4950
"default" => {
5051
"gitaly_address" => "tcp://{{ gitlab_gitaly_instance_ip }}:{{ gitlab_gitaly_instance_port }}"
5152
}
5253
}
5354
{% endif %}
55+
{% endif %}
5456

5557
gitlab_rails['gitlab_email_enabled'] = {{ gitlab_email_enabled }}
5658
gitlab_rails['ldap_enabled'] = {{ gitlab_ldap_enabled }}

0 commit comments

Comments
 (0)