Ryan
Ryan

Reputation: 13

Is it possible to run chef-client from within a knife exec command?

Looking to update node attributes (derived from a cookbook) using knife exec. I'd like to trigger chef-client after that so the cookbook can make the corresponding updates on the node. Is it possible to trigger the check-in from the same knife exec block, or do I need a separate knife ssh call (or similar) in order to check the node in?

Upvotes: 0

Views: 1228

Answers (1)

StephenKing
StephenKing

Reputation: 37600

knife exec executes Ruby code on the Chef Server. Indeed, you need to log into the nodes and trigger chef-client, either through knife ssh, Chef Push Jobs, Rundeck, etc.

Upvotes: 1

Related Questions