Permalink
Browse files

Move subversion related into its recipe.

  • Loading branch information...
1 parent 06c84e9 commit a841e621c5944f8ebb5c1e80898c69b2114ee442 @till committed Aug 9, 2012
@@ -0,0 +1,26 @@
+node["subversion"]["users"].each do |user|
+
+ case user
+ when 'root'
+ home_dir = "/root"
+ when 'www-data'
+ home_dir = "/var/www"
+ else
+ home_dir = "/home/#{user}"
+ end
+
+ directory "#{home_dir}/.subversion" do
+ owner user
+ mode "0755"
+ action :create
+ not_if "test -d #{home_dir}/.subversion"
+ end
+
+ cookbook_file "#{home_dir}/.subversion/servers" do
+ source "servers"
+ mode 0755
+ owner user
+ not_if "test -f #{home_dir}/.subversion/servers"
+ end
+
+end
@@ -1 +1,3 @@
package "subversion"
+
+include_recipe "subversion::configure"
@@ -5,32 +5,3 @@
source "Equifax_Secure_Certificate_Authority.cer.erb"
not_if "test -f /etc/ssl/certs/Equifax_Secure_Certificate_Authority.cer"
end
-
-users = %w[ root www-data ]
-
-users.each do |user|
-
- case user
- when 'root'
- home_dir = "/root"
- when 'www-data'
- home_dir = "/var/www"
- else
- home_dir = "/home/#{user}"
- end
-
- directory "#{home_dir}/.subversion" do
- owner user
- mode "0755"
- action :create
- not_if "test -d #{home_dir}/.subversion"
- end
-
- remote_file "#{home_dir}/.subversion/servers" do
- source "servers"
- mode 0755
- owner user
- not_if "test -f #{home_dir}/.subversion/servers"
- end
-
-end

0 comments on commit a841e62

Please sign in to comment.