Commit dcbb7259d5ee8f6373b4feee0b3820be7f66a88c
1 parent
a72d018f
Exists in
master
and in
17 other branches
Use template_symlink for gitlab-shell/config.yml
Showing
1 changed file
with
9 additions
and
3 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb
@@ -19,6 +19,7 @@ | @@ -19,6 +19,7 @@ | ||
19 | git_user = node['gitlab']['user']['username'] | 19 | git_user = node['gitlab']['user']['username'] |
20 | git_group = node['gitlab']['user']['group'] | 20 | git_group = node['gitlab']['user']['group'] |
21 | gitlab_shell_dir = "/opt/gitlab/embedded/service/gitlab-shell" | 21 | gitlab_shell_dir = "/opt/gitlab/embedded/service/gitlab-shell" |
22 | +gitlab_shell_var_dir = "/var/opt/gitlab/gitlab-shell" | ||
22 | repositories_path = node['gitlab']['gitlab-core']['repositories_path'] | 23 | repositories_path = node['gitlab']['gitlab-core']['repositories_path'] |
23 | ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh") | 24 | ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh") |
24 | log_directory = node['gitlab']['gitlab-shell']['log_directory'] | 25 | log_directory = node['gitlab']['gitlab-shell']['log_directory'] |
@@ -42,10 +43,15 @@ directory log_directory do | @@ -42,10 +43,15 @@ directory log_directory do | ||
42 | recursive true | 43 | recursive true |
43 | end | 44 | end |
44 | 45 | ||
45 | -template File.join(gitlab_shell_dir, "config.yml") do | ||
46 | - source "gitlab-shell-config.yml.erb" | 46 | +directory gitlab_shell_var_dir do |
47 | owner git_user | 47 | owner git_user |
48 | - group git_group | 48 | + mode '0700' |
49 | + recursive true | ||
50 | +end | ||
51 | + | ||
52 | +template_symlink File.join(gitlab_shell_var_dir, "config.yml") do | ||
53 | + link_from File.join(gitlab_shell_dir, "config.yml") | ||
54 | + source "gitlab-shell-config.yml.erb" | ||
49 | variables( | 55 | variables( |
50 | :user => git_user, | 56 | :user => git_user, |
51 | :api_url => node['gitlab']['gitlab-core']['internal_api_url'], | 57 | :api_url => node['gitlab']['gitlab-core']['internal_api_url'], |