Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

Commit

Permalink
Add configurable dir_group for git definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Gordeev committed Nov 6, 2012
1 parent c545370 commit 954d645
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chef/cookbooks/git/definitions/create_user_and_dirs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

user_name = params[:user_name] || params[:name]
comp_name = params[:comp_name] || params[:name]
dir_group = params[:dir_group] || "root"
dirs = ["/var/lib", "/var/log", "/var/lock", "/etc"]
dirs.map! { |d| d += "/" + comp_name }
dirs.concat(params[:opt_dirs]) if params[:opt_dirs]
Expand All @@ -17,7 +18,7 @@
dirs.each do |d|
directory d do
owner user_name
group "root"
group dir_group
end
end
end

0 comments on commit 954d645

Please sign in to comment.