Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chef/knife command to update clients after changing role

Tags:

chef-infra

After I boot up a server using Chef, if I've forgotten to include a recipe in a role (eg apache2::mod_ssl) is there a way to simply update the client without having to delete it and "knife server create" again?

Even better, the servers are all registered with my Chef server (Opscode platform), so in theory they should be able to receive updates from Opscode after I push role changes to the platform. Is this possible? Or is it possible to have my server check the Chef server for changes on a regular interval, perhaps every 10 minutes?

like image 318
Jason Ardell Avatar asked Oct 01 '10 20:10

Jason Ardell


1 Answers

This comes 2 years later, but I hope it helps somebody else :)

On the client node ( the server where you want to run the new recipe ), run :

sudo chef-client -i 600

"-i 600" : to keep polling chef-server for changes at an interval of 600 seconds .

like image 169
Emil Avatar answered Nov 02 '22 23:11

Emil