Structuring your configuration template with blocks and template inheritance
In order to achieve modularity for our templates, we have so far relied upon including sub-templates in one main template. And while this allows us to not write the same parts of the configuration multiple times, it is also less flexible while allowing the person writing the main template to define what part to include where.
So instead of including sub-templates, we could also provide a base template. In this base template, we will specify blocks of information. We could, for example, have a block for the message of the day and another block for the port configuration.
Our actual template will then inherit this base template and just overwrite those blocks that it wants to change while keeping the defaults that are specified in the base template for those blocks that it does not overwrite.
Using this approach, we can get even more cohesion within our configuration since, no matter who writes the...