Product SiteDocumentation Site

3. Terminology

An overview of different terms used throughout this document, as well as in upstream documentation.
In the following glossary of terms, whenever we speak of a term and refer to that exact term it will appear italic.
component
component
package
package type
declaration
declaration
definition
definition
distributable file
distributable file
file
file
property
A property is used to describe certain aspects of a system resource (not to be confused with a resource).
resource object
resource object
resource specification
resource specification
variable
variable
source
source

3.1. Language & Functions

Because Puppet uses its very own declarative language, here's a set of terms related to Puppets Language hueristics, and Puppets integrated functions.
class
A collection of resources grouped together in one comprehensible set called a class. It functions as a container for resources such as you would normally create them from types file, package and each other possible resource created by initializing a defined type, custom type or plugin type
An example class could be class sshd, grouping all resources related to configuring the SSH server together so that in a node manifest you would only need to include sshd to make sure your SSH server is configured properly, the service is started and enabled on boot.
Such a class would look like something similar to:
class sshd {
    package { "openssh-server":
        ensure => installed
    }

    file { "/etc/ssh/sshd_config":
        owner => "root",
        group => "root",
        mode => "640",
        source => "puppet:///ssh/sshd_config"
        require => Package["openssh-server"],
        notify => Service["sshd"]
    }

    service { "sshd":
        enable => true,
        ensure => running,
        require => File["/etc/ssh/sshd_config"]
    }
}
Inluding the class in a node manifest would look like so:
node 'node1.example.org' {
    include sshd
}
Classes also allow simple inheritance using the inherits keyword.
fact
fact
inheritance
inheritance
simple inheritance
Simple inheritance is limited to one parent per child. Childs can be nested in childs that already have another parent, but a child can only decend the chain of parents, and not choose to inherit from two parents directly.
Simple inheritance often limits how much flexibility you have in nesting parents onto childs.
manifest
manifest
See also: catalog, node manifest
module
module
parameter
parameter
plugin
plugin
plusignment operator
plusignment operator
realize
realize
recipe
recipe
subclass
subclass
template
template
template class
template class