Put a custom client.rb at knife bootstrap

is it possibel to put your changed client.rb at knife bootstrap, i know we
can write our own bootstrap but i could not find a good example of it,
i changed the the rb file under ~/.chef/bootstrap but looks like thats not
gettting picked up.

Am i missing something please help.

Thanks
Manoj

On Wed, Nov 20, 2013 at 3:45 PM, Manoj Thakkar manoj.thakkar@gmail.com wrote:

is it possibel to put your changed client.rb at knife bootstrap, i know we
can write our own bootstrap but i could not find a good example of it,
i changed the the rb file under ~/.chef/bootstrap but looks like thats not
gettting picked up.

Am i missing something please help.

The client.rb is generated by the default boostrap procedure by
calling a method inside Chef called config_content:

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

This is pulled into the bootstrap template as config_content:

https://github.com/opscode/chef/blob/master/lib/chef/knife/bootstrap/chef-full.erb#L62

If you don't like what it's doing, you can put your own content in the
section of your custom bootstrap template pertaining to the client.rb
generation and don't bother with config_content.

  • Julian

--
[ Julian C. Dunn jdunn@aquezada.com * Sorry, I'm ]
[ WWW: Julian Dunn's Blog - Commentary on media, technology, and everything in between. * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]

Oh, and to be clear, to make a custom bootstrap template, call it some
name e.g. "your-bootstrap-template.erb" and put it in
~/.chef/bootstrap; then when you bootstrap, call "knife bootstrap -d
your-bootstrap-template "

You can cargo-cult from chef-full.erb to get started.

  • Julian

On Wed, Nov 20, 2013 at 3:45 PM, Manoj Thakkar manoj.thakkar@gmail.com wrote:

is it possibel to put your changed client.rb at knife bootstrap, i know we
can write our own bootstrap but i could not find a good example of it,
i changed the the rb file under ~/.chef/bootstrap but looks like thats not
gettting picked up.

Am i missing something please help.

Thanks
Manoj

--
[ Julian C. Dunn jdunn@aquezada.com * Sorry, I'm ]
[ WWW: Julian Dunn's Blog - Commentary on media, technology, and everything in between. * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]