I'm in a situation where, for ease of management reasons, I would like to use the same config file template for two classes. I only expect a small section of the config file to be different between the two, and since I expect both classes to be included for most nodes, I would like to have a simple conditional to determine which class is including the file.
As an example, let's assume both
snuffler are included in the same node. I would like the template to look something like this
<% if scope.name == "sensor" %> include sensor/file1 include sensor/file2 <% else %> include snuffler/file1 include snuffler/file2 <% end %>
Is this possible directly or do I need to fall back to something like defining variables in the class definitions?