[chef] Re: Re: Howto setting log options in /etc/chef/client.rb at a Knife bootstrap


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Howto setting log options in /etc/chef/client.rb at a Knife bootstrap
  • Date: Wed, 28 Nov 2012 08:37:28 -0800


On Wednesday, November 28, 2012 at 4:57 AM, Andrea Campi wrote:




On Wed, Nov 28, 2012 at 1:06 PM, Oleg Volotov < " target="_blank"> > wrote:
Hi,

I would like to set the options in the /etc/chef/client.rb file at a knife bootstrap so that first client run are loggt too.

I think your best bet is to add the chef-client cookbook to the run list and let it update the client.rb. 

If you want to get these options picked up by the bootstrap run, you'll need to customize the bootstrap template (which generates the script that `knife bootstrap` runs on the remote system). Currently, there are no options for log location in the bootstrap code, so you'd want to replace the call to the config_content method in the template with your desired config, or replace the `start_chef` method with something that runs `chef-client -L /path/to/log`.

The links below should get you started.

http://wiki.opscode.com/display/chef/Custom+Knife+Bootstrap+Script
https://github.com/opscode/chef/blob/master/lib/chef/knife/bootstrap/chef-full.erb
https://github.com/opscode/chef/blob/master/lib/chef/knife/core/bootstrap_context.rb


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§