Class: Ridley::ClientResource
- Defined in:
- lib/ridley/resources/client_resource.rb
Overview
Instance Method Summary collapse
-
#regenerate_key(chef_client) ⇒ Ridley::ClientObject
Retrieves a client from the remote connection matching the given chef_id and regenerates it’s private key.
Methods inherited from Resource
#all, #connection, #create, #delete, #delete_all, #find, #initialize, #new, representation, represented_by, resource_path, set_resource_path, #update
Constructor Details
This class inherits a constructor from Ridley::Resource
Instance Method Details
#regenerate_key(chef_client) ⇒ Ridley::ClientObject
Retrieves a client from the remote connection matching the given chef_id and regenerates it’s private key. An instance of the updated object will be returned and have a value set for the ‘private_key’ accessor.
22 23 24 25 26 27 28 29 |
# File 'lib/ridley/resources/client_resource.rb', line 22 def regenerate_key(chef_client) unless chef_client = find(chef_client) abort Errors::ResourceNotFound.new("client '#{chef_client}' not found") end chef_client.private_key = true update(chef_client) end |