Type Reference
This page is autogenerated; any changes will get overwritten (last generated on Thu Aug 21 19:36:56 +0200 2008)
- Metaparameters
- Resource Types
- cron
- exec
- file
- filebucket
- group
- host
- k5login
- mailalias
- maillist
- mount
- nagios_command
- nagios_contact
- nagios_contactgroup
- nagios_host
- nagios_hostescalation
- nagios_hostextinfo
- nagios_hostgroup
- nagios_hostgroupescalation
- nagios_service
- nagios_servicedependency
- nagios_serviceescalation
- nagios_serviceextinfo
- nagios_servicegroup
- nagios_timeperiod
- notify
- package
- resources
- schedule
- service
- ssh_authorized_key
- sshkey
- tidy
- user
- yumrepo
- zone
Metaparameters
Metaparameters are parameters that work with any resource type; they are part of the Puppet framework itself rather than being part of the implementation of any given instance. Thus, any defined metaparameter can be used with any instance in your manifest, including defined components.
Available Metaparameters
alias
Creates an alias for the object. Puppet uses this internally when you provide a symbolic name:
file { sshdconfig:
path => $operatingsystem ? {
solaris => "/usr/local/etc/ssh/sshd_config",
default => "/etc/ssh/sshd_config"
},
source => "..."
}
service { sshd:
subscribe => file[sshdconfig]
}
When you use this feature, the parser sets sshdconfig as the name, and the library sets that as an alias for the file so the dependency lookup for sshd works. You can use this parameter yourself, but note that only the library can use these aliases; for instance, the following code will not work:
file { "/etc/ssh/sshd_config":
owner => root,
group => root,
alias => sshdconfig
}
file { sshdconfig:
mode => 644
}
There's no way here for the Puppet parser to know that these two stanzas should be affecting the same file.
See the language tutorial for more information.
before
This parameter is the opposite of require -- it guarantees that the specified object is applied later than the specifying object:
file { "/var/nagios/configuration":
source => "...",
recurse => true,
before => Exec["nagios-rebuid"]
}
exec { "nagios-rebuild":
command => "/usr/bin/make",
cwd => "/var/nagios/configuration"
}
This will make sure all of the files are up to date before the make command is run.
check
Propertys which should have their values retrieved but which should not actually be modified. This is currently used internally, but will eventually be used for querying, so that you could specify that you wanted to check the install state of all packages, and then query the Puppet client daemon to get reports on all packages.
loglevel
Sets the level that information will be logged. The log levels have the biggest impact when logs are sent to syslog (which is currently the default). Valid values are debug, info, notice, warning, err, alert, emerg, crit, verbose.
noop
Boolean flag indicating whether work should actually be done. Valid values are true, false.
notify
This parameter is the opposite of subscribe -- it sends events to the specified object:
file { "/etc/sshd_config":
source => "....",
notify => Service[sshd]
}
service { sshd:
ensure => running
}
This will restart the sshd service if the sshd config file changes.
require
One or more objects that this object depends on. This is used purely for guaranteeing that changes to required objects happen before the dependent object. For instance:
# Create the destination directory before you copy things down
file { "/usr/local/scripts":
ensure => directory
}
file { "/usr/local/scripts/myscript":
source => "puppet://server/module/myscript",
mode => 755,
require => File["/usr/local/scripts"]
}
Multiple dependencies can be specified by providing a comma-seperated list of resources, enclosed in square brackets:
require => [ File["/usr/local"], File["/usr/local/scripts"] ]
Note that Puppet will autorequire everything that it can, and there are hooks in place so that it's easy for resources to add new ways to autorequire objects, so if you think Puppet could be smarter here, let us know.
In fact, the above code was redundant -- Puppet will autorequire any parent directories that are being managed; it will automatically realize that the parent directory should be created before the script is pulled down.
Currently, exec resources will autorequire their CWD (if it is specified) plus any fully qualified paths that appear in the command. For instance, if you had an exec command that ran the myscript mentioned above, the above code that pulls the file down would be automatically listed as a requirement to the exec code, so that you would always be running againts the most recent version.
schedule
On what schedule the object should be managed. You must create a schedule object, and then reference the name of that object to use that for your schedule:
schedule { daily:
period => daily,
range => "2-4"
}
exec { "/usr/bin/apt-get update":
schedule => daily
}
The creation of the schedule object does not need to appear in the configuration before objects that use it.
subscribe
One or more objects that this object depends on. Changes in the subscribed to objects result in the dependent objects being refreshed (e.g., a service will get restarted). For instance:
class nagios {
file { "/etc/nagios/nagios.conf":
source => "puppet://server/module/nagios.conf",
alias => nagconf # just to make things easier for me
}
service { nagios:
running => true,
subscribe => File[nagconf]
}
}
Currently the exec, mount and service type support refreshing.
tag
Add the specified tags to the associated resource. While all resources are automatically tagged with as much information as possible (e.g., each class and definition containing the resource), it can be useful to add your own tags to a given resource.
Tags are currently useful for things like applying a subset of a host's configuration:
puppetd --test --tags mytag
This way, when you're testing a configuration you can run just the portion you're testing.
Resource Types
The namevar is the parameter used to uniquely identify a type instance. This is the parameter that gets assigned when a string is provided before the colon in a type declaration. In general, only developers will need to worry about which parameter is the namevar.
In the following code:
file { "/etc/passwd": owner => root, group => root, mode => 644 }/etc/passwd is considered the title of the file object (used for things like dependency handling), and because path is the namevar for file, that string is assigned to the path parameter.
Parameters determine the specific configuration of the instance. They either directly modify the system (internally, these are called properties) or they affect how the instance behaves (e.g., adding a search path for exec instances or determining recursion on file instances).
Providers provide low-level functionality for a given resource type. This is usually in the form of calling out to external commands.
When required binaries are specified for providers, fully qualifed paths indicate that the binary must exist at that specific path and unqualified binaries indicate that Puppet will search for the binary using the shell path.
Features are abilities that some providers might not support. You can use the list of supported features to determine how a given provider can be used.
Resource types define features they can use, and providers can be tested to see which features they provide.
cron
Installs and manages cron jobs. All fields except the command and the user are optional, although specifying no periodic fields would result in the command being executed every minute. While the name of the cron job is not part of the actual job, it is used by Puppet to store and retrieve it.
If you specify a cron job that matches an existing job in every way except name, then the jobs will be considered equivalent and the new name will be permanently associated with that job. Once this association is made and synced to disk, you can then manage the job normally (e.g., change the schedule of the job).
Example:
cron { logrotate:
command => "/usr/sbin/logrotate",
user => root,
hour => 2,
minute => 0
}
Note that all cron values can be specified as an array of values:
cron { logrotate:
command => "/usr/sbin/logrotate",
user => root,
hour => [2, 4]
}
Or using ranges, or the step syntax */2 (although there's no guarantee that your cron daemon supports it):
cron { logrotate:
command => "/usr/sbin/logrotate",
user => root,
hour => ['2-4'],
minute => '*/10'
}
Parameters
command
The command to execute in the cron job. The environment provided to the command varies by local system rules, and it is best to always provide a fully qualified command. The user's profile is not sourced when the command is run, so if the user's environment is desired it should be sourced manually.
All cron parameters support absent as a value; this will remove any existing values for that field.
ensure
The basic property that the object should be in. Valid values are absent, present.
environment
Any environment settings associated with this cron job. They will be stored between the header and the job in the crontab. There can be no guarantees that other, earlier settings will not also affect a given cron job.
Also, Puppet cannot automatically determine whether an existing, unmanaged environment setting is associated with a given cron job. If you already have cron jobs with environment settings, then Puppet will keep those settings in the same place in the file, but will not associate them with a specific job.
Settings should be specified exactly as they should appear in the crontab, e.g., PATH=/bin:/usr/bin:/usr/sbin.
hour
The hour at which to run the cron job. Optional; if specified, must be between 0 and 23, inclusive.
minute
The minute at which to run the cron job. Optional; if specified, must be between 0 and 59, inclusive.
month
The month of the year. Optional; if specified must be between 1 and 12 or the month name (e.g., December).
monthday
The day of the month on which to run the command. Optional; if specified, must be between 1 and 31.
name
- namevar
The symbolic name of the cron job. This name is used for human reference only and is generated automatically for cron jobs found on the system. This generally won't matter, as Puppet will do its best to match existing cron jobs against specified jobs (and Puppet adds a comment to cron jobs it adds), but it is at least possible that converting from unmanaged jobs to managed jobs might require manual intervention.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- crontab: Required binaries: crontab.
special
Special schedules only supported on FreeBSD.
target
Where the cron job should be stored. For crontab-style entries this is the same as the user and defaults that way. Other providers default accordingly.
user
The user to run the command as. This user must be allowed to run cron jobs, which is not currently checked by Puppet.
The user defaults to whomever Puppet is running as.
weekday
The weekday on which to run the command. Optional; if specified, must be between 0 and 6, inclusive, with 0 being Sunday, or must be the name of the day (e.g., Tuesday).
exec
Executes external commands. It is critical that all commands executed using this mechanism can be run multiple times without harm, i.e., they are idempotent. One useful way to create idempotent commands is to use the checks like creates to avoid running the command unless some condition is met.
Note also that you can restrict an exec to only run when it receives events by using the refreshonly parameter; this is a useful way to have your configuration respond to events with arbitrary commands.
It is worth noting that exec is special, in that it is not currently considered an error to have multiple exec instances with the same name. This was done purely because it had to be this way in order to get certain functionality, but it complicates things. In particular, you will not be able to use exec instances that share their commands with other instances as a dependency, since Puppet has no way of knowing which instance you mean.
For example:
# defined in the production class
exec { "make":
cwd => "/prod/build/dir",
path => "/usr/bin:/usr/sbin:/bin"
}
. etc. .
# defined in the test class
exec { "make":
cwd => "/test/build/dir",
path => "/usr/bin:/usr/sbin:/bin"
}
Any other type would throw an error, complaining that you had the same instance being managed in multiple places, but these are obviously different images, so exec had to be treated specially.
It is recommended to avoid duplicate names whenever possible.
Note that if an exec receives an event from another resource, it will get executed again (or execute the command specified in refresh, if there is one).
There is a strong tendency to use exec to do whatever work Puppet can't already do; while this is obviously acceptable (and unavoidable) in the short term, it is highly recommended to migrate work from exec to native Puppet types as quickly as possible. If you find that you are doing a lot of work with exec, please at least notify us at Reductive Labs what you are doing, and hopefully we can work with you to get a native resource type for the work you are doing.
Parameters
command
- namevar
The actual command to execute. Must either be fully qualified or a search path for the command must be provided. If the command succeeds, any output produced will be logged at the instance's normal log level (usually notice), but if the command fails (meaning its return code does not match the specified code) then any output is logged at the err log level.
creates
A file that this command creates. If this parameter is provided, then the command will only be run if the specified file does not exist:
exec { "tar xf /my/tar/file.tar":
cwd => "/var/tmp",
creates => "/var/tmp/myfile",
path => ["/usr/bin", "/usr/sbin"]
}
cwd
The directory from which to run the command. If this directory does not exist, the command will fail.
env
This parameter is deprecated. Use 'environment' instead.
environment
Any additional environment variables you want to set for a command. Note that if you use this to set PATH, it will override the path attribute. Multiple environment variables should be specified as an array.
group
The group to run the command as. This seems to work quite haphazardly on different platforms -- it is a platform issue not a Ruby or Puppet one, since the same variety exists when running commnands as different users in the shell.
logoutput
Whether to log output. Defaults to logging output at the loglevel for the exec resource. Use on_failure to only log the output when the command reports an error. Values are true, false, on_failure, and any legal log level. Valid values are true, false, on_failure.
onlyif
If this parameter is set, then this exec will only run if the command returns 0. For example:
exec { "logrotate":
path => "/usr/bin:/usr/sbin:/bin",
onlyif => "test `du /var/log/messages | cut -f1` -gt 100000"
}
This would run logrotate only if that test returned true.
Note that this command follows the same rules as the main command, which is to say that it must be fully qualified if the path is not set.
- Also note that onlyif can take an array as its value, eg:
- onlyif => ["test -f /tmp/file1", "test -f /tmp/file2"]
This will only run the exec if /all/ conditions in the array return true.
path
The search path used for command execution. Commands must be fully qualified if no path is specified. Paths can be specified as an array or as a colon-separated list.
refresh
How to refresh this command. By default, the exec is just called again when it receives an event from another resource, but this parameter allows you to define a different command for refreshing.
refreshonly
The command should only be run as a refresh mechanism for when a dependent object is changed. It only makes sense to use this option when this command depends on some other object; it is useful for triggering an action:
# Pull down the main aliases file
file { "/etc/aliases":
source => "puppet://server/module/aliases"
}
# Rebuild the database, but only when the file changes
exec { newaliases:
path => ["/usr/bin", "/usr/sbin"],
subscribe => File["/etc/aliases"],
refreshonly => true
}
Note that only subscribe and notify can trigger actions, not require, so it only makes sense to use refreshonly with subscribe or notify. Valid values are true, false.
returns
The expected return code. An error will be returned if the executed command returns something else. Defaults to 0.
timeout
The maximum time the command should take. If the command takes longer than the timeout, the command is considered to have failed and will be stopped. Use any negative number to disable the timeout. The time is specified in seconds.
unless
If this parameter is set, then this exec will run unless the command returns 0. For example:
exec { "/bin/echo root >> /usr/lib/cron/cron.allow":
path => "/usr/bin:/usr/sbin:/bin",
unless => "grep root /usr/lib/cron/cron.allow 2>/dev/null"
}
This would add root to the cron.allow file (on Solaris) unless grep determines it's already there.
Note that this command follows the same rules as the main command, which is to say that it must be fully qualified if the path is not set.
user
The user to run the command as. Note that if you use this then any error output is not currently captured. This is because of a bug within Ruby. If you are using Puppet to create this user, the exec will automatically require the user, as long as it is specified by name.
file
Manages local files, including setting ownership and permissions, creation of both files and directories, and retrieving entire files from remote servers. As Puppet matures, it expected that the file resource will be used less and less to manage content, and instead native resources will be used to do so.
If you find that you are often copying files in from a central location, rather than using native resources, please contact Reductive Labs and we can hopefully work with you to develop a native resource to support what you are doing.
Parameters
backup
Whether files should be backed up before being replaced. The preferred method of backing files up is via a filebucket, which stores files by their MD5 sums and allows easy retrieval without littering directories with backups. You can specify a local filebucket or a network-accessible server-based filebucket by setting backup => bucket-name. Alternatively, if you specify any value that begins with a . (e.g., .puppet-bak), then Puppet will use copy the file in the same directory with that value as the extension of the backup. Setting backup => false disables all backups of the file in question.
Puppet automatically creates a local filebucket named puppet and defaults to backing up there. To use a server-based filebucket, you must specify one in your configuration:
filebucket { main:
server => puppet
}
The puppetmasterd daemon creates a filebucket by default, so you can usually back up to your main server with this configuration. Once you've described the bucket in your configuration, you can use it in any file:
file { "/my/file":
source => "/path/in/nfs/or/something",
backup => main
}
This will back the file up to the central server.
At this point, the benefits of using a filebucket are that you do not have backup files lying around on each of your machines, a given version of a file is only backed up once, and you can restore any given file manually, no matter how old. Eventually, transactional support will be able to automatically restore filebucketed files.
checksum
How to check whether a file has changed. This state is used internally for file copying, but it can also be used to monitor files somewhat like Tripwire without managing the file contents in any way. You can specify that a file's checksum should be monitored and then subscribe to the file from another object and receive events to signify checksum changes, for instance. Valid values are mtime, timestamp, nosum, time, md5, md5lite. Values can also match (?-mix:^\{md5|md5lite|timestamp|mtime|time\}).
content
Specify the contents of a file as a string. Newlines, tabs, and spaces can be specified using the escaped syntax (e.g., n for a newline). The primary purpose of this parameter is to provide a kind of limited templating:
define resolve(nameserver1, nameserver2, domain, search) {
$str = "search $search
domain $domain
nameserver $nameserver1
nameserver $nameserver2
"
file { "/etc/resolv.conf":
content => $str
}
}
This attribute is especially useful when used with templating.
ensure
Whether to create files that don't currently exist. Possible values are absent, present (will match any form of file existence, and if the file is missing will create an empty file), file, and directory. Specifying absent will delete the file, although currently this will not recursively delete directories.
Anything other than those values will be considered to be a symlink. For instance, the following text creates a link:
# Useful on solaris
file { "/etc/inetd.conf":
ensure => "/etc/inet/inetd.conf"
}
You can make relative links:
# Useful on solaris
file { "/etc/inetd.conf":
ensure => "inet/inetd.conf"
}
If you need to make a relative link to a file named the same as one of the valid values, you must prefix it with ./ or something similar.
You can also make recursive symlinks, which will create a directory structure that maps to the target directory, with directories corresponding to each directory and links corresponding to each file. Valid values are absent (also called false), file, link, directory, present. Values can also match (?-mix:.).
force
Force the file operation. Currently only used when replacing directories with links. Valid values are true, false.
group
Which group should own the file. Argument can be either group name or group ID.
ignore
A parameter which omits action on files matching specified patterns during recursion. Uses Ruby's builtin globbing engine, so shell metacharacters are fully supported, e.g. [a-z]*. Matches that would descend into the directory structure are ignored, e.g., */*.
links
How to handle links during file actions. During file copying, follow will copy the target file instead of the link, manage will copy the link itself, and ignore will just pass it by. When not copying, manage and ignore behave equivalently (because you cannot really ignore links entirely during local recursion), and follow will manage the file to which the link points. Valid values are follow, manage.
mode
Mode the file should be. Currently relatively limited: you must specify the exact mode the file should be.
owner
To whom the file should belong. Argument can be user name or user ID.
purge
Whether unmanaged files should be purged. If you have a filebucket configured the purged files will be uploaded, but if you do not, this will destroy data. Only use this option for generated files unless you really know what you are doing. This option only makes sense when recursively managing directories.
Note that when using purge with source, Puppet will purge any files that are not on the remote system. Valid values are true, false.
recurse
Whether and how deeply to do recursive management. Valid values are true, false, inf. Values can also match (?-mix:^[0-9]+$).
replace
Whether or not to replace a file that is sourced but exists. This is useful for using file sources purely for initialization. Valid values are true (also called yes), false (also called no).
source
Copy a file over the current file. Uses checksum to determine when a file should be copied. Valid values are either fully qualified paths to files, or URIs. Currently supported URI types are puppet and file.
This is one of the primary mechanisms for getting content into applications that Puppet does not directly support and is very useful for those configuration files that don't change much across sytems. For instance:
class sendmail {
file { "/etc/mail/sendmail.cf":
source => "puppet://server/module/sendmail.cf"
}
}
You can also leave out the server name, in which case puppetd will fill in the name of its configuration server and puppet will use the local filesystem. This makes it easy to use the same configuration in both local and centralized forms.
Currently, only the puppet scheme is supported for source URL's. Puppet will connect to the file server running on server to retrieve the contents of the file. If the server part is empty, the behavior of the command-line interpreter (puppet) and the client demon (puppetd) differs slightly: puppet will look such a file up on the module path on the local host, whereas puppetd will connect to the puppet server that it received the manifest from.
See the fileserver configuration documentation for information on how to configure and use file services within Puppet.
If you specify multiple file sources for a file, then the first source that exists will be used. This allows you to specify what amount to search paths for files:
file { "/path/to/my/file":
source => [
"/nfs/files/file.$host",
"/nfs/files/file.$operatingsystem",
"/nfs/files/file"
]
}
This will use the first found file as the source.
You cannot currently copy links using this mechanism; set links to follow if any remote sources are links.
sourceselect
Whether to copy all valid sources, or just the first one. This parameter is only used in recursive copies; by default, the first valid source is the only one used as a recursive source, but if this parameter is set to all, then all valid sources will have all of their contents copied to the local host, and for sources that have the same file, the source earlier in the list will be used. Valid values are first, all.
target
The target for creating a link. Currently, symlinks are the only type supported. Valid values are notlink. Values can also match (?-mix:.).
type
A read-only state to check the file type.
filebucket
A repository for backing up files. If no filebucket is defined, then files will be backed up in their current directory, but the filebucket can be either a host- or site-global repository for backing up. It stores files and returns the MD5 sum, which can later be used to retrieve the file if restoration becomes necessary. A filebucket does not do any work itself; instead, it can be specified as the value of backup in a file object.
Currently, filebuckets are only useful for manual retrieval of accidentally removed files (e.g., you look in the log for the md5 sum and retrieve the file with that sum from the filebucket), but when transactions are fully supported filebuckets will be used to undo transactions.
You will normally want to define a single filebucket for your whole network and then use that as the default backup location:
# Define the bucket
filebucket { main: server => puppet }
# Specify it as the default target
File { backup => main }
Puppetmaster servers create a filebucket by default, so this will work in a default configuration.
Parameters
path
The path to the local filebucket. If this is not specified, then the bucket is remote and server must be specified.
port
The port on which the remote server is listening. Defaults to the normal Puppet port, 8140.
server
The server providing the filebucket. If this is not specified, then the bucket is local and path must be specified.
group
Manage groups. This type can only create groups. Group membership must be managed on individual users. This resource type uses the prescribed native tools for creating groups and generally uses POSIX APIs for retrieving information about them. It does not directly modify /etc/group or anything.
For most platforms, the tools used are groupadd and its ilk; for Mac OS X, NetInfo is used. This is currently unconfigurable, but if you desperately need it to be so, please contact us.
Parameters
allowdupe
Whether to allow duplicate GIDs. This option does not work on FreeBSD (contract to the pw man page). Valid values are true, false.
ensure
The basic state that the object should be in. Valid values are absent, present.
gid
The group ID. Must be specified numerically. If not specified, a number will be picked, which can result in ID differences across systems and thus is not recommended. The GID is picked according to local system standards.
name
- namevar
The group name. While naming limitations vary by system, it is advisable to keep the name to the degenerate limitations, which is a maximum of 8 characters beginning with a letter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
directoryservice: Group management using DirectoryService on OS X. Required binaries: /usr/bin/dscl.
- groupadd: Group management via groupadd and its ilk. The default
for most platforms Required binaries: groupadd, groupmod, groupdel.
- ldap: Group management via ldap. This provider requires that you
have valid values for all of the ldap-related settings, including ldapbase. You will also almost definitely need settings for ldapuser and ldappassword, so that your clients can write to ldap.
Note that this provider will automatically generate a GID for you if you do not specify one, but it is a potentially expensive operation, as it iterates across all existing groups to pick the appropriate next one.
netinfo: Group management using NetInfo. Required binaries: niutil, nireport. Default for operatingsystem == darwin.
pw: Group management via pw. Only works on FreeBSD. Required binaries: /usr/sbin/pw. Default for operatingsystem == freebsd.
host
Installs and manages host entries. For most systems, these entries will just be in /etc/hosts, but some systems (notably OS X) will have different solutions.
Parameters
alias
Any alias the host might have. Multiple values must be specified as an array. Note that this state has the same name as one of the metaparams; using this state to set aliases will make those aliases available in your Puppet scripts and also on disk.
ensure
The basic property that the object should be in. Valid values are absent, present.
ip
The host's IP address, IPv4 or IPv6.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- netinfo: Host management in NetInfo. This provider is highly experimental and is known
not to work currently. Required binaries: niutil, mount, umount, nireport, df. Default for operatingsystem == darwin.
parsed:
target
The file in which to store service information. Only used by those providers that write to disk (i.e., not NetInfo).
k5login
Manage the .k5login file for a user. Specify the full path to the .k5login file as the name and an array of principals as the property principals.
Parameters
ensure
The basic property that the object should be in. Valid values are absent, present.
mode
Manage the k5login file's mode
principals
The principals present in the .k5login file.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- k5login: The k5login provider is the only provider for the k5login
type.
mailalias
Creates an email alias in the local alias database.
Parameters
ensure
The basic property that the object should be in. Valid values are absent, present.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- aliases:
recipient
Where email should be sent. Multiple values should be specified as an array.
target
The file in which to store the aliases. Only used by those providers that write to disk (i.e., not NetInfo).
maillist
Manage email lists. This resource type currently can only create and remove lists, it cannot reconfigure them.
Parameters
admin
The email address of the administrator.
description
The description of the mailing list.
ensure
The basic property that the object should be in. Valid values are purged, absent, present.
mailserver
The name of the host handling email for the list.
password
The admin password.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- mailman: Required binaries: newlist, /var/lib/mailman/mail/mailman, list_lists, rmlist.
webserver
The name of the host providing web archives and the administrative interface.
mount
Manages mounted filesystems, including putting mount information into the mount table. The actual behavior depends on the value of the 'ensure' parameter.
Note that if a mount receives an event from another resource, it will try to remount the filesystems if ensure is set to mounted.
Parameters
atboot
Whether to mount the mount at boot. Not all platforms support this.
blockdevice
The device to fsck. This is property is only valid on Solaris, and in most cases will default to the correct value.
device
The device providing the mount. This can be whatever device is supporting by the mount, including network devices or devices specified by UUID rather than device path, depending on the operating system.
dump
Whether to dump the mount. Not all platforms support this. Valid values are 1 or 0. Default is 0. Values can also match (?-mix:(0|1)).
ensure
Control what to do with this mount. Set this attribute to present to make sure the filesystem is in the filesystem table but not mounted (if the filesystem is currently mounted, it will be unmounted). Set it to absent to unmount (if necessary) and remove the filesystem from the fstab. Set to mounted to add it to the fstab and mount it. Valid values are absent, present (also called unmounted), mounted.
fstype
The mount type. Valid values depend on the operating system.
options
Mount options for the mounts, as they would appear in the fstab.
pass
The pass in which the mount is checked.
path
The deprecated name for the mount point. Please use name now.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- parsed: Required binaries: mount, umount. Supported features: refreshable.
remounts
Whether the mount can be remounted mount -o remount. If this is false, then the filesystem will be unmounted and remounted manually, which is prone to failure. Valid values are true, false.
target
The file in which to store the mount table. Only used by those providers that write to disk (i.e., not NetInfo).
nagios_command
The Nagios type command. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_command.cfg, but you can send them to a different file by setting their target attribute.
Parameters
command_line
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
target
target
use
Nagios configuration file parameter.
nagios_contact
The Nagios type contact. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_contact.cfg, but you can send them to a different file by setting their target attribute.
Parameters
alias
Nagios configuration file parameter.
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
host_notification_commands
Nagios configuration file parameter.
host_notification_options
Nagios configuration file parameter.
host_notification_period
Nagios configuration file parameter.
pager
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
register
Nagios configuration file parameter.
service_notification_commands
Nagios configuration file parameter.
service_notification_options
Nagios configuration file parameter.
service_notification_period
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_contactgroup
The Nagios type contactgroup. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_contactgroup.cfg, but you can send them to a different file by setting their target attribute.
Parameters
alias
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
members
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
target
target
use
Nagios configuration file parameter.
nagios_host
The Nagios type host. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_host.cfg, but you can send them to a different file by setting their target attribute.
Parameters
address
Nagios configuration file parameter.
alias
Nagios configuration file parameter.
check_command
Nagios configuration file parameter.
checks_enabled
Nagios configuration file parameter.
contact_groups
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
event_handler_enabled
Nagios configuration file parameter.
failure_prediction_enabled
Nagios configuration file parameter.
flap_detection_enabled
Nagios configuration file parameter.
max_check_attempts
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
notification_options
Nagios configuration file parameter.
notification_period
Nagios configuration file parameter.
notifications_enabled
Nagios configuration file parameter.
parents
Nagios configuration file parameter.
process_perf_data
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
register
Nagios configuration file parameter.
retain_nonstatus_information
Nagios configuration file parameter.
retain_status_information
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_hostescalation
The Nagios type hostescalation. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostescalation.cfg, but you can send them to a different file by setting their target attribute.
Parameters
contact_groups
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
escalation_options
Nagios configuration file parameter.
first_notification
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
last_notification
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
register
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_hostextinfo
The Nagios type hostextinfo. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostextinfo.cfg, but you can send them to a different file by setting their target attribute.
Parameters
ensure
The basic property that the object should be in. Valid values are absent, present.
icon_image
Nagios configuration file parameter.
icon_image_alt
Nagios configuration file parameter.
notes_url
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
target
target
use
Nagios configuration file parameter.
vrml_image
Nagios configuration file parameter.
nagios_hostgroup
The Nagios type hostgroup. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostgroup.cfg, but you can send them to a different file by setting their target attribute.
Parameters
alias
Nagios configuration file parameter.
contact_groups
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
members
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
target
target
use
Nagios configuration file parameter.
nagios_hostgroupescalation
The Nagios type hostgroupescalation. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_hostgroupescalation.cfg, but you can send them to a different file by setting their target attribute.
Parameters
contact_groups
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
first_notification
Nagios configuration file parameter.
last_notification
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
target
target
use
Nagios configuration file parameter.
nagios_service
The Nagios type service. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_service.cfg, but you can send them to a different file by setting their target attribute.
Parameters
active_checks_enabled
Nagios configuration file parameter.
check_command
Nagios configuration file parameter.
check_freshness
Nagios configuration file parameter.
check_period
Nagios configuration file parameter.
contact_groups
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
event_handler
Nagios configuration file parameter.
event_handler_enabled
Nagios configuration file parameter.
flap_detection_enabled
Nagios configuration file parameter.
freshness_threshold
Nagios configuration file parameter.
host
Nagios configuration file parameter.
host_name
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
is_volatile
Nagios configuration file parameter.
max_check_attempts
Nagios configuration file parameter.
name
Nagios configuration file parameter.
normal_check_interval
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
notification_options
Nagios configuration file parameter.
notification_period
Nagios configuration file parameter.
notifications_enabled
Nagios configuration file parameter.
obsess_over_service
Nagios configuration file parameter.
parallelize_check
Nagios configuration file parameter.
passive_checks_enabled
Nagios configuration file parameter.
process_perf_data
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
register
Nagios configuration file parameter.
retain_nonstatus_information
Nagios configuration file parameter.
retain_status_information
Nagios configuration file parameter.
retry_check_interval
Nagios configuration file parameter.
servicegroups
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_servicedependency
The Nagios type servicedependency. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_servicedependency.cfg, but you can send them to a different file by setting their target attribute.
Parameters
dependent_host_name
Nagios configuration file parameter.
dependent_hostgroup_name
Nagios configuration file parameter.
dependent_service_description
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
execution_failure_criteria
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
notification_failure_criteria
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
service_description
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_serviceescalation
The Nagios type serviceescalation. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_serviceescalation.cfg, but you can send them to a different file by setting their target attribute.
Parameters
contact_groups
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
first_notification
Nagios configuration file parameter.
hostgroup_name
Nagios configuration file parameter.
last_notification
Nagios configuration file parameter.
notification_interval
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
service_description
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_serviceextinfo
The Nagios type serviceextinfo. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_serviceextinfo.cfg, but you can send them to a different file by setting their target attribute.
Parameters
ensure
The basic property that the object should be in. Valid values are absent, present.
icon_image
Nagios configuration file parameter.
icon_image_alt
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
service_description
Nagios configuration file parameter.
target
target
use
Nagios configuration file parameter.
nagios_servicegroup
The Nagios type servicegroup. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_servicegroup.cfg, but you can send them to a different file by setting their target attribute.
Parameters
alias
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
target
target
use
Nagios configuration file parameter.
nagios_timeperiod
The Nagios type timeperiod. This resource type is autogenerated using the model developed in Naginator, and all of the Nagios types are generated using the same code and the same library.
This type generates Nagios configuration statements in Nagios-parseable configuration files. By default, the statements will be added to /etc/nagios/nagios_timeperiod.cfg, but you can send them to a different file by setting their target attribute.
Parameters
alias
Nagios configuration file parameter.
ensure
The basic property that the object should be in. Valid values are absent, present.
friday
Nagios configuration file parameter.
monday
Nagios configuration file parameter.
provider
The specific backend for provider to use. You will seldom need to specify this -- Puppet will usually discover the appropriate provider for your platform. Available providers are:
- naginator:
saturday
Nagios configuration file parameter.
sunday
Nagios configuration file parameter.
target
target
thursday
Nagios configuration file parameter.
tuesday
Nagios configuration file parameter.
use
Nagios configuration file parameter.
wednesday
Nagios configuration file parameter.
notify
Sends an arbitrary message to the puppetd run-time log.
Parameters
message
The message to be sent to the log.
withpath
Whether to not to show the full object path. Valid values are true, false.
package
Manage packages. There is a basic dichotomy in package support right now: Some package types (e.g., yum and apt) can retrieve their own package files, while others (e.g., rpm and sun) cannot. For those package formats that cannot retrieve their own files, you can use the source parameter to point to the correct file.
Puppet will automatically guess the packaging format that you are using based on the platform you are on, but you can override it using the provider parameter; each provider defines what it requires in order to function, and you must meet those requirements to use a given provider.
Features
- installable: The provider can install packages.
- purgeable: The provider can purge packages. This generally means that all traces of the package are removed, including existing configuration files. This feature is thus destructive and should be used with the utmost care.
- uninstallable: The provider can uninstall packages.
- upgradeable: The provider can upgrade to the latest version of a package. This feature is used by specifying latest as the desired value for the package.
- versionable: The provider is capable of interrogating the package database for installed version(s), and can select which out of a set of available versions of a package to install if asked.
| Provider | installable | purgeable | uninstallable | upgradeable | versionable |
|---|---|---|---|---|---|
| appdmg | X | ||||
| apple | X | ||||
| apt | X | X | X | X | X |
| aptitude | X | X | X | X | X |
| aptrpm | X | X | X | X | X |
| blastwave | X | X | X | ||
| darwinport | X | X | X | ||
| dpkg | X | X | X | X | |
| fink | X | X | X | X | X |
| freebsd | X | X | |||
| gem | X | X | X | X | |
| hpux | X | X | |||
| openbsd | X | X | |||
| pkgdmg | X | ||||
| portage | X | X | X | X | |
| ports | X | X | X | ||
| rpm | X | X | X | ||
| rug | X | X | X | X | |
| sun | X | X | X | ||
| sunfreeware | X | X | X | ||
| up2date | X | X | X | ||
| urpmi | X | X | X | X | |
| yum | X | X | X | X |
Parameters
adminfile
A file containing package defaults for installing packages. This is currently only used on Solaris. The value will be validated according to system rules, which in the case of Solaris means that