Application definition
Application definitions look a lot like a defined resource, but are also similar to a traditional Puppet profile. They describe a collection of components that make an entire system, but unlike profiles, are not tied down to a single node. These application definitions describe a configured state of one or more nodes, broken down by application components.
Application definitions will resemble defined types, with a few key differences:
- They are titled
applicationinstead ofdefine. - Each resource must be name spaced within the module:
# Application used instead of 'class' or 'define'
application 'example' (
$var,
) {
# app1 exports its database configuration items
example::app1 {
config => $var,
export => Database['app1'],
}
# app2 both imports the previous database and exports its own type: Application
example::app2 {
config => $var,
consume => Database['app1'],
export => Application['app1'],
}What is important to note...