Chef 11からtemplateの中でtemplateを呼び出せるようになっていた

Opscode Chef 11 Release / OpsCode blog

Long time contributor and past-MVP Andrea Campi added support for partial templates. This is a significant feature if you have templates with large sections that change based on attributes. You can now render additional templates inside a template with <%= render 'other_template.erb' %>. This functionality expands the capability of the template reasource in a huge way.

ということで、

  • /chef/cookboof/hoge/templates/default/hoge.conf.erb

の中で

<%= render 'homhom.conf.erb' %>

と書くと

  • /chef/cookboof/hoge/templates/default/homhom.conf.erb

が呼び出されて、templateの中でtemplateを呼び出すことができる。
だいぶ便利っぽい