Puppet does this work by providing system administrators a declarative language that allows a configuration file to be described and then filled in differently based on the role that the computer on which the configuration file exists is playing.
FORBES: Why Adopting the Declarative Programming Practices Will Improve Your Return from Technology