chef include recipes override attributes -


when include recipe in recipe how override attributes.

it looks include recipe used default attributes not attributes of recipe when run in run_list.

when creating wrapper cookbook, common override attributes.

suppose, have my_web_server cookbook my_web_server/recipes/default.rb this:

include_recipe "apache2" 

and override attribute default_site_enabled apache2 cookbook. file my_web_server/attributes/default.rb should like:

override['apache']['default_site_enabled'] = true 

and don't forget specify dependencies in my_web_server/metadata.rb like:

depends "apache2" 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -