# Put a custom client.rb at knife bootstrap

**URL:** <https://discourse.chef.io/t/put-a-custom-client-rb-at-knife-bootstrap/4724>\
**Category:** Chef Infra (archive)\
**Created:** [November 20, 2013, 8:45pm UTC](https://discourse.chef.io/t/put-a-custom-client-rb-at-knife-bootstrap/4724 "2013-11-20T20:45:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manoj\_Thakkar](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Manoj\_Thakkar](https://discourse.chef.io/u/Manoj_Thakkar)\
**Post date:** [November 20, 2013, 8:45pm UTC](https://discourse.chef.io/t/put-a-custom-client-rb-at-knife-bootstrap/4724/1 "2013-11-20T20:45:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)\
**Post date:** [November 21, 2013, 4:17am UTC](https://discourse.chef.io/t/put-a-custom-client-rb-at-knife-bootstrap/4724/2 "2013-11-21T04:17:30Z")

</div>

On Wed, Nov 20, 2013 at 3:45 PM, Manoj Thakkar [manoj.thakkar@gmail.com](mailto: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](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](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](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
[WWW: [Julian Dunn's Blog - Commentary on media, technology, and everything in between.](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/ \* compliant!]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]

---

<div class="post-metadata">

**Author:** ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)\
**Post date:** [November 21, 2013, 4:19am UTC](https://discourse.chef.io/t/put-a-custom-client-rb-at-knife-bootstrap/4724/3 "2013-11-21T04:19:12Z")

</div>

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