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
Post a Comment