How do i create a chef cookbook template?



  • This creates the template directory, with a file called index.html.erb, Extension of the file is for erlang ruby. The cookbook path in your knife.rb file will be used.

    $ chef generate template webapp index.html
    Recipe: code_generator::template
      * directory[./webapp/templates] action create
        - create new directory ./webapp/templates
      * template[./webapp/templates/index.html.erb] action create
        - create new file ./webapp/templates/index.html.erb
        - update content in file ./webapp/templates/index.html.erb from none to e3b0c4
        (diff output suppressed by config)
    

Log in to reply
 

© Lightnetics 2024