Got a query about using Chef templates.
Is it possible to update a template based on which recipe is being used. An example is that I have a collectd default recipe and a rabbitmq one that gets called. The rabbitmq part will still use parts of the default/base recipe and I only want to add data to the template if the rabbitmq bit is being called (IE collectd::rabbitmq).
Is there anyway to customise the base template based on what recipe is being used?
Cheers!
Yep, just use template attributes. Something like this:
And the template
And it doesn't just need to be a flag. You could just have lots of attributes, and do something like this based on which ones are defined.