Commit dcbb7259d5ee8f6373b4feee0b3820be7f66a88c

Authored by Jacob Vosmaer
1 parent a72d018f

Use template_symlink for gitlab-shell/config.yml

files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb
... ... @@ -19,6 +19,7 @@
19 19 git_user = node['gitlab']['user']['username']
20 20 git_group = node['gitlab']['user']['group']
21 21 gitlab_shell_dir = "/opt/gitlab/embedded/service/gitlab-shell"
  22 +gitlab_shell_var_dir = "/var/opt/gitlab/gitlab-shell"
22 23 repositories_path = node['gitlab']['gitlab-core']['repositories_path']
23 24 ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh")
24 25 log_directory = node['gitlab']['gitlab-shell']['log_directory']
... ... @@ -42,10 +43,15 @@ directory log_directory do
42 43 recursive true
43 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 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 55 variables(
50 56 :user => git_user,
51 57 :api_url => node['gitlab']['gitlab-core']['internal_api_url'],
... ...