File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -93,4 +93,7 @@ gitlab_mattermost_only_context: "false"
9393
9494gitlab_feature_flags : []
9595
96+ # Internal variable to determine whether the configuration object for Gitaly
97+ # is already present in gitlab_additional_configurations
98+ __gitaly_configuration_exists : false
9699...
Original file line number Diff line number Diff line change 1919 - " Reconfigure Primary GitLab"
2020 - " Reconfigure Non Primary GitLab"
2121
22+ - name : " Check if gitaly is present"
23+ when :
24+ - " gitlab_use_internal_gitaly"
25+ - " gitlab_additional_configurations | length > 0"
26+ - " item.gitaly is defined"
27+ ansible.builtin.set_fact :
28+ __gitaly_exists : true
29+ __gitaly_item : " {{ item.gitaly }}"
30+ with_items : " {{ gitlab_additional_configurations }}"
31+
32+ - name : " Check if gitaly['configuration'] is present"
33+ when :
34+ - " item.key is defined"
35+ - " item.key == 'configuration'"
36+ ansible.builtin.set_fact :
37+ __gitaly_configuration_exists : true
38+ with_items : " {{ __gitaly_item | default([]) }}"
39+
40+ - name : " Warn if gitaly['configuration'] is already present"
41+ when :
42+ - " gitlab_use_internal_gitaly"
43+ - " __gitaly_configuration_exists"
44+ ansible.builtin.fail :
45+ msg : " Please make sure to configure gitaly storage paths yourself in gitaly['configuration']"
46+ ignore_errors : true
47+
2248- name : " Copy GitLab Configuration File."
2349 become : true
2450 ansible.builtin.template :
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ gitlab_rails['redis_sentinels_password'] = "{{ gitlab_redis_sentinel_password }}
3030{% endif %}
3131gitlab_rails['monitoring_whitelist'] = ["{{ gitlab_ip_range }}"]
3232
33- {% if gitlab_use_internal_gitaly %}
33+ {% if gitlab_use_internal_gitaly and not __gitaly_configuration_exists %}
3434gitaly['configuration'] = {
3535 "storage": [
3636 {
You can’t perform that action at this time.
0 commit comments