Hello everyone!
We discussed a problem of splitting LNST recipes into multiple files. This is, at the moment, supported by LNST in the form of source attributes. If you'd like to put a part of your recipe to a different file you can do this like this:
<machine source="abc.xml"/>
machine.xml: <machine id="5"> ... </machine>
This works however the problem is it doesn't help with code duplication because there is no (non-obscure) way of passing parameters to the included file.
We discussed this and came up with the following proposal. We could remove the source attribute completely and use a different tag called 'include' instead:
<include what="machine" source="abc.xml"> <options> <option name="ip" value="192.168.1.2"/> </options> </include>
Includes like this one could have params/options child tag. These parameters would then be defined as aliases in the included part of the file.
A way to add parameters to included snippets woud allow us to reuse different parts of the recipe for different purposes/machines. Now you can split the file into multiple files, but if you have two machines with exactly the same configuration and only different ip addresses, you need to keep the config twice. That is really inefficient.
Anybody has any ideas/suggestions about this? I personally think, that the <include> tag would be very useful, but I'm not really sure about the format. It seems quite long to me. However, I'm not sure how to make it shorter and still keep it nicely readable.
Cheers, Radek
lnst-developers@lists.fedorahosted.org