Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 49025f17a0683787d44466250857d982e0aca88f 1 parent 06ceefd
@reset reset authored
Showing with 3 additions and 1 deletion.
  1. +1 −1  users/providers/manage.rb
  2. +2 −0  users/resources/manage.rb
View
2  users/providers/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"
View
2  users/resources/manage.rb
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.