I'm constructing a template to build a configuration file, and the service that consumes this file places constraints on identifier lengths.
If an identifier is longer than, say, 6 characters, the service will get part-way through applying the configuration, fail, and leave the node in an inconsistent state.
How can I perform an assertion to trigger a deployment transaction failure, preventing the target nodes' service from being misconfigured?
My particular circumstance is Salt, but I would be curious to see how other systems solve the problem as well.