Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (22 sloc) 492 Bytes
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
Jump to Line
Something went wrong with that request. Please try again.