Class | Chef::Client |
In: |
lib/chef/client.rb
|
Parent: | Object |
The main object in a Chef run. Preps a Chef::Node and Chef::RunContext, syncs cookbooks if necessary, and triggers convergence.
json_attribs | [R] | |
node | [RW] | |
ohai | [RW] | |
rest | [RW] | |
run_status | [R] | |
runner | [RW] |
Clears all notifications for client run status events. Primarily for testing purposes.
Add a notification for the ‘client run success’ event. The notification is provided as a block. The current Chef::RunStatus object will be passed to the notification_block when the event is triggered.
Add a notification for the ‘client run failed’ event. The notification is provided as a block. The current Chef::RunStatus is passed to the notification_block when the event is triggered.
Add a notification for the ‘client run started’ event. The notification is provided as a block. The current Chef::RunStatus object will be passed to the notification_block when the event is triggered.
Builds a new node object for this client. Starts with querying for the FQDN of the current host (unless it is supplied), then merges in the facts from Ohai.
node<Chef::Node>: | Returns the created node object, also stored in @node |
Do a full run for this Chef::Client. Calls:
* run_ohai - Collect information about the system * build_node - Get the last known state, merge with local changes * register - If not in solo mode, make sure the server knows about this client * sync_cookbooks - If not in solo mode, populate the local cache with the node's cookbooks * converge - Bring this system up to date
true: | Always returns true. |