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

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -