From dcbb7259d5ee8f6373b4feee0b3820be7f66a88c Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 7 Feb 2014 18:03:18 +0100 Subject: [PATCH] Use template_symlink for gitlab-shell/config.yml --- files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb index 1698005..147492d 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb @@ -19,6 +19,7 @@ git_user = node['gitlab']['user']['username'] git_group = node['gitlab']['user']['group'] gitlab_shell_dir = "/opt/gitlab/embedded/service/gitlab-shell" +gitlab_shell_var_dir = "/var/opt/gitlab/gitlab-shell" repositories_path = node['gitlab']['gitlab-core']['repositories_path'] ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh") log_directory = node['gitlab']['gitlab-shell']['log_directory'] @@ -42,10 +43,15 @@ directory log_directory do recursive true end -template File.join(gitlab_shell_dir, "config.yml") do - source "gitlab-shell-config.yml.erb" +directory gitlab_shell_var_dir do owner git_user - group git_group + mode '0700' + recursive true +end + +template_symlink File.join(gitlab_shell_var_dir, "config.yml") do + link_from File.join(gitlab_shell_dir, "config.yml") + source "gitlab-shell-config.yml.erb" variables( :user => git_user, :api_url => node['gitlab']['gitlab-core']['internal_api_url'], -- libgit2 0.21.2