Permalink
Browse files

add configurable cookbook attribute for users_manage LWRP

used to determine which cookbook the authorized_keys template is located in
  • Loading branch information...
1 parent 06ceefd commit 49025f17a0683787d44466250857d982e0aca88f @reset reset committed Mar 6, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −1 users/providers/manage.rb
  2. +2 −0 users/resources/manage.rb
@@ -87,7 +87,7 @@ def initialize(*args)
if u['ssh_keys']
template "#{home_dir}/.ssh/authorized_keys" do
source "authorized_keys.erb"
- cookbook "users"
+ cookbook new_resource.cookbook
owner u['id']
group u['gid'] || u['id']
mode "0600"
@@ -24,7 +24,9 @@
# :search_group is the groups name to search for, defaults to resource name
# :group_name is the string name of the group to create, defaults to resource name
# :group_id is the numeric id of the group to create
+# :cookbook is the name of the cookbook that the authorized_keys template should be found in
attribute :data_bag, :kind_of => String, :default => "users"
attribute :search_group, :kind_of => String, :name_attribute => true
attribute :group_name, :kind_of => String, :name_attribute => true
attribute :group_id, :kind_of => Integer, :required => true
+attribute :cookbook, :kind_of => String, :default => "users"

0 comments on commit 49025f1

Please sign in to comment.