How do you get chef-client to use -l debug during knife bootstrap

The documentation seems to suggest that using the –VV option to knife will cause knife to invoke chef-client with the –l debug option. This doesn’t seem to work. The knife.rb code seems to add the “-l debug” when Config[:verbosity] is >=2. There is no ‘verbosity’ option defined in the knife.rb file. Will simply adding:

 verbosity 2

Cause knife to invoke chef-client on the target machine with –l debug?

Hi,

Changing verbosity (given sufficiently up-to-date) Chef client
version should do the trick, as per:

https://github.com/opscode/chef/blob/master/lib/chef/knife/core/bootstrap_context.rb#L122

Alternatively, you can cheat a little by changing the default location
of the Chef Client executable:

In your knife.rb add the following:

chef_client_path 'chef-client -l debug'

This works by the virtue of the following code:
https://github.com/opscode/chef/blob/master/lib/chef/knife/core/bootstrap_context.rb#L120

There is also a way were you can add -l debug to the default
bootstrap template:
https://github.com/opscode/chef/blob/master/lib/chef/knife/bootstrap/chef-full.erb#L79

And then ask knife to use it.

Hope this helps.

Regards,
Krzysztof

On 5 December 2014 at 17:55, Eric Swenson eswenson@intertrust.com wrote:

The documentation seems to suggest that using the –VV option to knife will cause knife to invoke chef-client with the –l debug option. This doesn’t seem to work. The knife.rb code seems to add the “-l debug” when Config[:verbosity] is >=2. There is no ‘verbosity’ option defined in the knife.rb file. Will simply adding:

 verbosity 2

Cause knife to invoke chef-client on the target machine with –l debug?