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,7 +53,6 @@ default['gitlab']['gitlab-rails']['rate_limit_period'] = 60 | ||
53 | default['gitlab']['gitlab-rails']['gitlab_host'] = node['fqdn'] | 53 | default['gitlab']['gitlab-rails']['gitlab_host'] = node['fqdn'] |
54 | default['gitlab']['gitlab-rails']['gitlab_port'] = 80 | 54 | default['gitlab']['gitlab-rails']['gitlab_port'] = 80 |
55 | default['gitlab']['gitlab-rails']['gitlab_https'] = false | 55 | default['gitlab']['gitlab-rails']['gitlab_https'] = false |
56 | -default['gitlab']['gitlab-rails']['gitlab_user'] = default['gitlab']['user']['username'] | ||
57 | default['gitlab']['gitlab-rails']['gitlab_email_from'] = "gitlab@#{node['fqdn']}" | 56 | default['gitlab']['gitlab-rails']['gitlab_email_from'] = "gitlab@#{node['fqdn']}" |
58 | default['gitlab']['gitlab-rails']['gitlab_support_email'] = "support@localhost" | 57 | default['gitlab']['gitlab-rails']['gitlab_support_email'] = "support@localhost" |
59 | default['gitlab']['gitlab-rails']['gitlab_default_projects_limit'] = 10 | 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,13 +24,6 @@ gitlab_rails_tmp_dir = File.join(gitlab_rails_dir, "tmp") | ||
24 | gitlab_rails_public_uploads_dir = node['gitlab']['gitlab-rails']['uploads_directory'] | 24 | gitlab_rails_public_uploads_dir = node['gitlab']['gitlab-rails']['uploads_directory'] |
25 | gitlab_rails_log_dir = node['gitlab']['gitlab-rails']['log_directory'] | 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 | gitlab_rails_dir, | 28 | gitlab_rails_dir, |
36 | gitlab_rails_etc_dir, | 29 | gitlab_rails_etc_dir, |
files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
@@ -24,7 +24,7 @@ production: &base | @@ -24,7 +24,7 @@ production: &base | ||
24 | # relative_url_root: /gitlab | 24 | # relative_url_root: /gitlab |
25 | 25 | ||
26 | # Uncomment and customize if you can't use the default user to run GitLab (default: 'git') | 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 | ## Email settings | 29 | ## Email settings |
30 | # Email address used in the "From" field in mails sent by GitLab | 30 | # Email address used in the "From" field in mails sent by GitLab |