Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 8261b61

Browse files
committed
allow compatibility with gitlab < 14.7 (shouldn't be used anymore)
1 parent 40c59bc commit 8261b61

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

templates/gitlab.rb.j2

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ gitlab_rails['backup_path'] = "{{ gitlab_backup_path }}"
3838
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example#L118
3939
gitlab_rails['ldap_enabled'] = {{ gitlab_ldap_enabled | lower }}
4040
{% if gitlab_ldap_enabled %}
41+
{% if gitlab_version is version('14.7, '<') %}
42+
gitlab_rails['ldap_host'] = '{{ gitlab_ldap_host }}'
43+
gitlab_rails['ldap_port'] = {{ gitlab_ldap_port }}
44+
gitlab_rails['ldap_uid'] = '{{ gitlab_ldap_uid }}'
45+
gitlab_rails['ldap_method'] = '{{ gitlab_ldap_method}}' # 'ssl' or 'plain'
46+
gitlab_rails['ldap_bind_dn'] = '{{ gitlab_ldap_bind_dn }}'
47+
gitlab_rails['ldap_password'] = '{{ gitlab_ldap_password }}'
48+
gitlab_rails['ldap_allow_username_or_email_login'] = true
49+
gitlab_rails['ldap_base'] = '{{ gitlab_ldap_base }}'
50+
{% else %}
4151
gitlab_rails['ldap_servers'] = {
4252
'main' => {
4353
'label' => 'LDAP',
@@ -51,6 +61,7 @@ gitlab_rails['ldap_servers'] = {
5161
'base' => '{{ gitlab_ldap_base }',
5262
}
5363
}
64+
{% endif %}
5465
{% endif %}
5566
5667
# GitLab Nginx

0 commit comments

Comments
 (0)