Commit 37c03d26f57c070cf027ad329f7204fe974ffe81
1 parent
eb1c9312
Exists in
master
and in
9 other branches
Simpler approach to setting user in gitlab.yml
Doesn't allow a setting that differs from user['username'], but that probably doesn't make much sense anyhow.
Showing
3 changed files
with
1 additions
and
9 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/attributes/default.rb
... | ... | @@ -53,7 +53,6 @@ default['gitlab']['gitlab-rails']['rate_limit_period'] = 60 |
53 | 53 | default['gitlab']['gitlab-rails']['gitlab_host'] = node['fqdn'] |
54 | 54 | default['gitlab']['gitlab-rails']['gitlab_port'] = 80 |
55 | 55 | default['gitlab']['gitlab-rails']['gitlab_https'] = false |
56 | -default['gitlab']['gitlab-rails']['gitlab_user'] = default['gitlab']['user']['username'] | |
57 | 56 | default['gitlab']['gitlab-rails']['gitlab_email_from'] = "gitlab@#{node['fqdn']}" |
58 | 57 | default['gitlab']['gitlab-rails']['gitlab_support_email'] = "support@localhost" |
59 | 58 | default['gitlab']['gitlab-rails']['gitlab_default_projects_limit'] = 10 | ... | ... |
files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb
... | ... | @@ -24,13 +24,6 @@ gitlab_rails_tmp_dir = File.join(gitlab_rails_dir, "tmp") |
24 | 24 | gitlab_rails_public_uploads_dir = node['gitlab']['gitlab-rails']['uploads_directory'] |
25 | 25 | gitlab_rails_log_dir = node['gitlab']['gitlab-rails']['log_directory'] |
26 | 26 | |
27 | -# in gitlab.yml, use the main gitlab username if the admin did | |
28 | -# not specifically set gitlab_user | |
29 | -if node['gitlab']['gitlab-rails']['gitlab_user'] == | |
30 | - node.default['gitlab']['gitlab-rails']['gitlab_user'] | |
31 | - node.set['gitlab']['gitlab-rails']['gitlab_user'] = node['gitlab']['user']['username'] | |
32 | -end | |
33 | - | |
34 | 27 | [ |
35 | 28 | gitlab_rails_dir, |
36 | 29 | gitlab_rails_etc_dir, | ... | ... |
files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
... | ... | @@ -24,7 +24,7 @@ production: &base |
24 | 24 | # relative_url_root: /gitlab |
25 | 25 | |
26 | 26 | # Uncomment and customize if you can't use the default user to run GitLab (default: 'git') |
27 | - user: <%= @gitlab_user %> | |
27 | + user: <%= node['gitlab']['user']['username'] %> | |
28 | 28 | |
29 | 29 | ## Email settings |
30 | 30 | # Email address used in the "From" field in mails sent by GitLab | ... | ... |