Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible
roles
gitlab
Commits
e2b72e52
Commit
e2b72e52
authored
Feb 24, 2023
by
nd
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://git.cccv.de/infra/ansible/roles/gitlab
parents
e316f4a3
6437b6d4
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+16
-0
16 additions, 0 deletions
README.md
defaults/main.yml
+17
-3
17 additions, 3 deletions
defaults/main.yml
files/gitlab-ldap-sync.py
+5
-1
5 additions, 1 deletion
files/gitlab-ldap-sync.py
templates/gitlab.rb.j2
+20
-12
20 additions, 12 deletions
templates/gitlab.rb.j2
with
58 additions
and
16 deletions
README.md
+
16
−
0
View file @
e2b72e52
...
@@ -66,6 +66,22 @@ ldap:
...
@@ -66,6 +66,22 @@ ldap:
enabled: 'false'
enabled: 'false'
servers: {}
servers: {}
# configure smtp server for outgoing mail
smtp:
enabled: false
server: ~
port: 465
user: ~
password: ~
domain: ~
authentication: 'login' # Can be: 'login', 'plain'
starttls: true
tls: false
verify_ssl: 'peer' # Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert'
#ca_path: '/etc/ssl/certs'
#ca_file: '/etc/ssl/certs/ca-certificates.crt'
# array of groups to create
# array of groups to create
groups: []
groups: []
```
```
This diff is collapsed.
Click to expand it.
defaults/main.yml
+
17
−
3
View file @
e2b72e52
...
@@ -28,6 +28,20 @@ gitlab:
...
@@ -28,6 +28,20 @@ gitlab:
auto_link_ldap_user
:
'
true'
auto_link_ldap_user
:
'
true'
providers
:
[]
providers
:
[]
upload_size_max
:
128M
upload_size_max
:
128M
mail
:
mail
:
{}
from
:
~
#from: 'git@domain'
reply_to
:
~
#reply_to: 'git@domain'
smtp
:
enabled
:
false
server
:
~
port
:
465
user
:
~
password
:
~
domain
:
~
authentication
:
'
login'
# Can be: 'login', 'plain'
starttls
:
true
tls
:
false
verify_ssl
:
'
peer'
# Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert'
ca_path
:
~
# eg '/etc/ssl/certs'
ca_file
:
~
# eg '/etc/ssl/certs/ca-certificates.crt'
>
>>>>>>
6437b6d42cd6f19b8ff220e02319088c9819bd70
This diff is collapsed.
Click to expand it.
files/gitlab-ldap-sync.py
+
5
−
1
View file @
e2b72e52
...
@@ -54,7 +54,11 @@ def connect_ldap(host, port, encryption, ca_file, bind_dn, bind_passwd):
...
@@ -54,7 +54,11 @@ def connect_ldap(host, port, encryption, ca_file, bind_dn, bind_passwd):
old_search
=
conn
.
search
old_search
=
conn
.
search
def
search
(
*
args
,
**
kwargs
):
def
search
(
*
args
,
**
kwargs
):
kwargs
.
update
({
'
attributes
'
:
[
ldap3
.
ALL_ATTRIBUTES
,
ldap3
.
ALL_OPERATIONAL_ATTRIBUTES
]})
kwargs
.
update
({
'
attributes
'
:
[
ldap3
.
ALL_ATTRIBUTES
,
ldap3
.
ALL_OPERATIONAL_ATTRIBUTES
]})
return
old_search
(
*
args
,
**
kwargs
)
ret
=
old_search
(
*
args
,
**
kwargs
)
result_code
=
conn
.
result
[
'
result
'
]
if
result_code
!=
0
:
raise
Exception
(
f
'
LDAP SEARCH failed with result code
{
result_code
}
'
)
return
ret
conn
.
search
=
search
conn
.
search
=
search
return
conn
return
conn
...
...
This diff is collapsed.
Click to expand it.
templates/gitlab.rb.j2
+
20
−
12
View file @
e2b72e52
...
@@ -628,22 +628,30 @@ gitlab_rails['initial_root_password'] = "{{ gitlab.initial_root_password }}"
...
@@ -628,22 +628,30 @@ gitlab_rails['initial_root_password'] = "{{ gitlab.initial_root_password }}"
###! Docs: https://docs.gitlab.com/omnibus/settings/smtp.html
###! Docs: https://docs.gitlab.com/omnibus/settings/smtp.html
###! **Use smtp instead of sendmail/postfix.**
###! **Use smtp instead of sendmail/postfix.**
# gitlab_rails['smtp_enable'] = true
{% if gitlab.smtp.enabled %}
# gitlab_rails['smtp_address'] = "smtp.server"
gitlab_rails['smtp_enable'] = {{ gitlab.smtp.enabled|to_json }}
# gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_address'] = "{{ gitlab.smtp.server }}"
# gitlab_rails['smtp_user_name'] = "smtp user"
gitlab_rails['smtp_port'] = {{ gitlab.smtp.port }}
# gitlab_rails['smtp_password'] = "smtp password"
gitlab_rails['smtp_user_name'] = "{{ gitlab.smtp.user }}"
# gitlab_rails['smtp_domain'] = "example.com"
gitlab_rails['smtp_password'] = "{{ gitlab.smtp.password }}"
# gitlab_rails['smtp_authentication'] = "login"
{% if gitlab.smtp.domain %}
# gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_domain'] = "{{ gitlab.smtp.domain }}"
# gitlab_rails['smtp_tls'] = false
{% endif %}
gitlab_rails['smtp_authentication'] = "{{ gitlab.smtp.authentication }}"
gitlab_rails['smtp_enable_starttls_auto'] = {{ gitlab.smtp.starttls|to_json }}
gitlab_rails['smtp_tls'] = {{ gitlab.smtp.tls|to_json }}
###! **Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert'**
###! **Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert'**
###! Docs: http://api.rubyonrails.org/classes/ActionMailer/Base.html
###! Docs: http://api.rubyonrails.org/classes/ActionMailer/Base.html
#
gitlab_rails['smtp_openssl_verify_mode'] = '
none
'
gitlab_rails['smtp_openssl_verify_mode'] = '
{{ gitlab.smtp.verify_ssl }}
'
# gitlab_rails['smtp_ca_path'] = "/etc/ssl/certs"
{% if gitlab.smtp.ca_path %}
# gitlab_rails['smtp_ca_file'] = "/etc/ssl/certs/ca-certificates.crt"
gitlab_rails['smtp_ca_path'] = "{{ gitlab.smtp.ca_path }}"
{% endif %}
{% if gitlab.smtp.ca_file %}
gitlab_rails['smtp_ca_file'] = "{{ gitlab.smtp.ca_file }}"
{% endif %}
{% endif %}
################################################################################
################################################################################
## Container Registry settings
## Container Registry settings
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment