Resource Type Reference (Single-Page)

NOTE: This page was generated from the Puppet source code on 2018-08-28 06:47:28 -0700

About resource types

Built-in types and custom types

This is the documentation for the built-in resource types and providers, keyed to a specific Puppet version. (See sidebar.) Additional resource types can be distributed in Puppet modules; you can find and install modules by browsing the Puppet Forge. See each module’s documentation for information on how to use its custom resource types.

Declaring resources

To manage resources on a target system, you should declare them in Puppet manifests. For more details, see the resources page of the Puppet language reference.

You can also browse and manage resources interactively using the puppet resource subcommand; run puppet resource --help for more information.

Namevars and titles

All types have a special attribute called the namevar. This is the attribute used to uniquely identify a resource on the target system.

Each resource has a specific namevar attribute, which is listed on this page in each resource’s reference. If you don’t specify a value for the namevar, its value defaults to the resource’s title.

Example of a title as a default namevar:

file { '/etc/passwd':
  owner => 'root',
  group => 'root',
  mode  => '0644',
}

In this code, /etc/passwd is the title of the file resource.

The file type’s namevar is path. Because we didn’t provide a path value in this example, the value defaults to the title, /etc/passwd.

Example of a namevar:

file { 'passwords':
  path  => '/etc/passwd',
  owner => 'root',
  group => 'root',
  mode  => '0644',

This example is functionally similar to the previous example. Its path namevar attribute has an explicitly set value separate from the title, so its name is still /etc/passwd.

Other Puppet code can refer to this resource as File['/etc/passwd'] to declare relationships.

Attributes, parameters, properties

The attributes (sometimes called parameters) of a resource determine its desired state. They either directly modify the system (internally, these are called “properties”) or they affect how the resource behaves (for instance, adding a search path for exec resources or controlling directory recursion on file resources).

Providers

Providers implement the same resource type on different kinds of systems. They usually do this by calling out to external commands.

Although Puppet will automatically select an appropriate default provider, you can override the default with the provider attribute. (For example, package resources on Red Hat systems default to the yum provider, but you can specify provider => gem to install Ruby libraries with the gem command.)

Providers often specify binaries that they require. Fully qualified binary paths indicate that the binary must exist at that specific path, and unqualified paths indicate that Puppet will search for the binary using the shell path.

Features

Features are abilities that some providers might not support. Generally, a feature corresponds to some allowed values for a resource attribute.

This is often the case with the ensure attribute. In most types, Puppet doesn’t create new resources when omitting ensure but still modifies existing resources to match specifications in the manifest. However, in some types this isn’t always the case, or additional values provide more granular control. For example, if a package provider supports the purgeable feature, you can specify ensure => purged to delete configuration files installed by the package.

Resource types define the set of features they can use, and providers can declare which features they provide.

NOTE: This page was generated from the Puppet source code on 2018-08-28 06:47:28 -0700

augeas

Description

Apply a change or an array of changes to the filesystem using the augeas tool.

Requires:

  • Augeas
  • The ruby-augeas bindings

Sample usage with a string:

augeas{"test1" :
  context => "/files/etc/sysconfig/firstboot",
  changes => "set RUN_FIRSTBOOT YES",
  onlyif  => "match other_value size > 0",
}

Sample usage with an array and custom lenses:

augeas{"jboss_conf":
  context   => "/files",
  changes   => [
      "set etc/jbossas/jbossas.conf/JBOSS_IP $ipaddress",
      "set etc/jbossas/jbossas.conf/JAVA_HOME /usr",
    ],
  load_path => "$/usr/share/jbossas/lenses",
}

Attributes

augeas { 'resource title':
  name       => # (namevar) The name of this task. Used for...
  changes    => # The changes which should be applied to the...
  context    => # Optional context path. This value is prepended...
  force      => # Optional command to force the augeas type to...
  incl       => # Load only a specific file, such as `/etc/hosts`. 
  lens       => # Use a specific lens, such as `Hosts.lns`. When...
  load_path  => # Optional colon-separated list or array of...
  onlyif     => # Optional augeas command and comparisons to...
  provider   => # The specific backend to use for this `augeas...
  returns    => # The expected return code from the augeas...
  root       => # A file system path; all files loaded by Augeas...
  show_diff  => # Whether to display differences when the file...
  type_check => # Whether augeas should perform typechecking...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this task. Used for uniqueness.

(↑ Back to augeas attributes)

changes

The changes which should be applied to the filesystem. This can be a command or an array of commands. The following commands are supported:

  • set <PATH> <VALUE> — Sets the value VALUE at location PATH
  • setm <PATH> <SUB> <VALUE> — Sets multiple nodes (matching SUB relative to PATH) to VALUE
  • rm <PATH> — Removes the node at location PATH
  • remove <PATH> — Synonym for rm
  • clear <PATH> — Sets the node at PATH to NULL, creating it if needed
  • clearm <PATH> <SUB> — Sets multiple nodes (matching SUB relative to PATH) to NULL
  • touch <PATH> — Creates PATH with the value NULL if it does not exist
  • ins <LABEL> (before|after) <PATH> — Inserts an empty node LABEL either before or after PATH.
  • insert <LABEL> <WHERE> <PATH> — Synonym for ins
  • mv <PATH> <OTHER PATH> — Moves a node at PATH to the new location OTHER PATH
  • move <PATH> <OTHER PATH> — Synonym for mv
  • rename <PATH> <LABEL> — Rename a node at PATH to a new LABEL
  • defvar <NAME> <PATH> — Sets Augeas variable $NAME to PATH
  • defnode <NAME> <PATH> <VALUE> — Sets Augeas variable $NAME to PATH, creating it with VALUE if needed

If the context parameter is set, that value is prepended to any relative PATHs.

(↑ Back to augeas attributes)

context

Optional context path. This value is prepended to the paths of all changes if the path is relative. If the incl parameter is set, defaults to /files + incl; otherwise, defaults to the empty string.

(↑ Back to augeas attributes)

force

Optional command to force the augeas type to execute even if it thinks changes will not be made. This does not override the onlyif parameter.

(↑ Back to augeas attributes)

incl

Load only a specific file, such as /etc/hosts. This can greatly speed up the execution the resource. When this parameter is set, you must also set the lens parameter to indicate which lens to use.

(↑ Back to augeas attributes)

lens

Use a specific lens, such as Hosts.lns. When this parameter is set, you must also set the incl parameter to indicate which file to load. The Augeas documentation includes a list of available lenses.

(↑ Back to augeas attributes)

load_path

Optional colon-separated list or array of directories; these directories are searched for schema definitions. The agent’s $libdir/augeas/lenses path will always be added to support pluginsync.

(↑ Back to augeas attributes)

onlyif

Optional augeas command and comparisons to control the execution of this type.

Note: values is not an actual augeas API command. It calls match to retrieve an array of paths in and then `get` to retrieve the values from each of the returned paths.

Supported onlyif syntax:

  • get <AUGEAS_PATH> <COMPARATOR> <STRING>
  • values <MATCH_PATH> include <STRING>
  • values <MATCH_PATH> not_include <STRING>
  • values <MATCH_PATH> == <AN_ARRAY>
  • values <MATCH_PATH> != <AN_ARRAY>
  • match <MATCH_PATH> size <COMPARATOR> <INT>
  • match <MATCH_PATH> include <STRING>
  • match <MATCH_PATH> not_include <STRING>
  • match <MATCH_PATH> == <AN_ARRAY>
  • match <MATCH_PATH> != <AN_ARRAY>

where:

  • AUGEAS_PATH is a valid path scoped by the context
  • MATCH_PATH is a valid match syntax scoped by the context
  • COMPARATOR is one of >, >=, !=, ==, <=, or <
  • STRING is a string
  • INT is a number
  • AN_ARRAY is in the form ['a string', 'another']

(↑ Back to augeas attributes)

provider

The specific backend to use for this augeas resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to augeas attributes)

returns

(Property: This attribute represents concrete state on the target system.)

The expected return code from the augeas command. Should not be set.

(↑ Back to augeas attributes)

root

A file system path; all files loaded by Augeas are loaded underneath root.

(↑ Back to augeas attributes)

show_diff

Whether to display differences when the file changes, defaulting to true. This parameter is useful for files that may contain passwords or other secret data, which might otherwise be included in Puppet reports or other insecure outputs. If the global show_diff setting is false, then no diffs will be shown even if this parameter is true.

Valid values are true, false, yes, no.

(↑ Back to augeas attributes)

type_check

Whether augeas should perform typechecking. Defaults to false.

Valid values are true, false.

(↑ Back to augeas attributes)

Providers

augeas

  • Supported features: execute_changes, need_to_run?, parse_commands.

Provider Features

Available features:

  • execute_changes — Actually make the changes
  • need_to_run? — If the command should run
  • parse_commands — Parse the command string

Provider support:

Provider execute changes need to run? parse commands
augeas X X X

computer

Description

Computer object management using DirectoryService on OS X.

Note that these are distinctly different kinds of objects to ‘hosts’, as they require a MAC address and can have all sorts of policy attached to them.

This provider only manages Computer objects in the local directory service domain, not in remote directories.

If you wish to manage /etc/hosts file on Mac OS X, then simply use the host type as per other platforms.

This type primarily exists to create localhost Computer objects that MCX policy can then be attached to.

Autorequires: If Puppet is managing the plist file representing a Computer object (located at /var/db/dslocal/nodes/Default/computers/{name}.plist), the Computer resource will autorequire it.

Attributes

computer { 'resource title':
  name       => # (namevar) The authoritative 'short' name of the computer...
  ensure     => # Control the existences of this computer record...
  en_address => # The MAC address of the primary network...
  ip_address => # The IP Address of the Computer...
  provider   => # The specific backend to use for this `computer...
  realname   => # The 'long' name of the computer...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The authoritative ‘short’ name of the computer record.

(↑ Back to computer attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

Control the existences of this computer record. Set this attribute to present to ensure the computer record exists. Set it to absent to delete any computer records with this name

Valid values are present, absent.

(↑ Back to computer attributes)

en_address

(Property: This attribute represents concrete state on the target system.)

The MAC address of the primary network interface. Must match en0.

(↑ Back to computer attributes)

ip_address

(Property: This attribute represents concrete state on the target system.)

The IP Address of the Computer object.

(↑ Back to computer attributes)

provider

The specific backend to use for this computer resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to computer attributes)

realname

The ‘long’ name of the computer record.

(↑ Back to computer attributes)

Providers

directoryservice

Computer object management using DirectoryService on OS X. Note that these are distinctly different kinds of objects to ‘hosts’, as they require a MAC address and can have all sorts of policy attached to them.

This provider only manages Computer objects in the local directory service domain, not in remote directories.

If you wish to manage /etc/hosts on Mac OS X, then simply use the host type as per other platforms.

  • Default for operatingsystem == darwin.

cron

Description

Installs and manages cron jobs. Every cron resource created by Puppet requires a command and at least one periodic attribute (hour, minute, month, monthday, weekday, or special). While the name of the cron job is not part of the actual job, the name is stored in a comment beginning with # Puppet Name: . These comments are used to match crontab entries created by Puppet with cron resources.

If an existing crontab entry happens to match the scheduling and command of a cron resource that has never been synced, Puppet will defer to the existing crontab entry and will not create a new entry tagged with the # Puppet Name: comment.

Example:

cron { 'logrotate':
  command => '/usr/sbin/logrotate',
  user    => 'root',
  hour    => 2,
  minute  => 0,
}

Note that all periodic attributes 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 these):

cron { 'logrotate':
  command => '/usr/sbin/logrotate',
  user    => 'root',
  hour    => ['2-4'],
  minute  => '*/10',
}

An important note: the Cron type will not reset parameters that are removed from a manifest. For example, removing a minute => 10 parameter will not reset the minute component of the associated cronjob to *. These changes must be expressed by setting the parameter to minute => absent because Puppet only manages parameters that are out of sync with manifest entries.

Autorequires: If Puppet is managing the user account specified by the user property of a cron resource, then the cron resource will autorequire that user.

Attributes

cron { 'resource title':
  name        => # (namevar) The symbolic name of the cron job.  This name is 
  ensure      => # The basic property that the resource should be...
  command     => # The command to execute in the cron job.  The...
  environment => # Any environment settings associated with this...
  hour        => # The hour at which to run the cron job. Optional; 
  minute      => # The minute at which to run the cron job...
  month       => # The month of the year. Optional; if specified...
  monthday    => # The day of the month on which to run the...
  provider    => # The specific backend to use for this `cron...
  special     => # A special value such as 'reboot' or 'annually'...
  target      => # The name of the crontab file in which the cron...
  user        => # The user who owns the cron job.  This user must...
  weekday     => # The weekday on which to run the command...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

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.

(↑ Back to cron attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to cron attributes)

command

(Property: This attribute represents concrete state on the target system.)

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.

(↑ Back to cron attributes)

environment

(Property: This attribute represents concrete state on the target system.)

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, like PATH=/bin:/usr/bin:/usr/sbin.

(↑ Back to cron attributes)

hour

(Property: This attribute represents concrete state on the target system.)

The hour at which to run the cron job. Optional; if specified, must be between 0 and 23, inclusive.

(↑ Back to cron attributes)

minute

(Property: This attribute represents concrete state on the target system.)

The minute at which to run the cron job. Optional; if specified, must be between 0 and 59, inclusive.

(↑ Back to cron attributes)

month

(Property: This attribute represents concrete state on the target system.)

The month of the year. Optional; if specified, must be either:

  • A number between 1 and 12, inclusive, with 1 being January
  • The name of the month, such as ‘December’.

(↑ Back to cron attributes)

monthday

(Property: This attribute represents concrete state on the target system.)

The day of the month on which to run the command. Optional; if specified, must be between 1 and 31.

(↑ Back to cron attributes)

provider

The specific backend to use for this cron resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to cron attributes)

special

(Property: This attribute represents concrete state on the target system.)

A special value such as ‘reboot’ or ‘annually’. Only available on supported systems such as Vixie Cron. Overrides more specific time of day/week settings. Set to ‘absent’ to make puppet revert to a plain numeric schedule.

(↑ Back to cron attributes)

target

(Property: This attribute represents concrete state on the target system.)

The name of the crontab file in which the cron job should be stored.

This property defaults to the value of the user property if set, the user running Puppet or root.

For the default crontab provider, this property is functionally equivalent to the user property and should be avoided. In particular, setting both user and target to different values will result in undefined behavior.

(↑ Back to cron attributes)

user

(Property: This attribute represents concrete state on the target system.)

The user who owns the cron job. This user must be allowed to run cron jobs, which is not currently checked by Puppet.

This property defaults to the user running Puppet or root.

The default crontab provider executes the system crontab using the user account specified by this property.

(↑ Back to cron attributes)

weekday

(Property: This attribute represents concrete state on the target system.)

The weekday on which to run the command. Optional; if specified, must be either:

  • A number between 0 and 7, inclusive, with 0 or 7 being Sunday
  • The name of the day, such as ‘Tuesday’.

(↑ Back to cron attributes)

Providers

crontab

  • Required binaries: crontab.

exec

Description

Executes external commands.

Any command in an exec resource must be able to run multiple times without causing harm — that is, it must be idempotent. There are three main ways for an exec to be idempotent:

  • The command itself is already idempotent. (For example, apt-get update.)
  • The exec has an onlyif, unless, or creates attribute, which prevents Puppet from running the command unless some condition is met.
  • The exec has refreshonly => true, which only allows Puppet to run the command when some other resource is changed. (See the notes on refreshing below.)

A caution: There’s a widespread tendency to use collections of execs to manage resources that aren’t covered by an existing resource type. This works fine for simple tasks, but once your exec pile gets complex enough that you really have to think to understand what’s happening, you should consider developing a custom resource type instead, as it will be much more predictable and maintainable.

Duplication: Even though command is the namevar, Puppet allows multiple exec resources with the same command value.

Refresh: exec resources can respond to refresh events (via notify, subscribe, or the ~> arrow). The refresh behavior of execs is non-standard, and can be affected by the refresh and refreshonly attributes:

  • If refreshonly is set to true, the exec will only run when it receives an event. This is the most reliable way to use refresh with execs.
  • If the exec already would have run and receives an event, it will run its command up to two times. (If an onlyif, unless, or creates condition is no longer met after the first run, the second run will not occur.)
  • If the exec already would have run, has a refresh command, and receives an event, it will run its normal command, then run its refresh command (as long as any onlyif, unless, or creates conditions are still met after the normal command finishes).
  • If the exec would not have run (due to an onlyif, unless, or creates attribute) and receives an event, it still will not run.
  • If the exec has noop => true, would otherwise have run, and receives an event from a non-noop resource, it will run once (or run its refresh command instead, if it has one).

In short: If there’s a possibility of your exec receiving refresh events, it becomes doubly important to make sure the run conditions are restricted.

Autorequires: If Puppet is managing an exec’s cwd or the executable file used in an exec’s command, the exec resource will autorequire those files. If Puppet is managing the user that an exec should run as, the exec resource will autorequire that user.

Attributes

exec { 'resource title':
  command     => # (namevar) The actual command to execute.  Must either be...
  creates     => # A file to look for before running the command...
  cwd         => # The directory from which to run the command.  If 
  environment => # An array of any additional environment variables 
  group       => # The group to run the command as.  This seems to...
  logoutput   => # Whether to log command output in addition to...
  onlyif      => # A test command that checks the state of the...
  path        => # The search path used for command execution...
  provider    => # The specific backend to use for this `exec...
  refresh     => # An alternate command to run when the `exec...
  refreshonly => # The command should only be run as a refresh...
  returns     => # The expected exit code(s).  An error will be...
  timeout     => # The maximum time the command should take.  If...
  tries       => # The number of times execution of the command...
  try_sleep   => # The time to sleep in seconds between...
  umask       => # Sets the umask to be used while executing this...
  unless      => # A test command that checks the state of the...
  user        => # The user to run the command as.  Note that if...
  # ...plus any applicable metaparameters.
}

command

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

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.

Multiple exec resources can use the same command value; Puppet only uses the resource title to ensure execs are unique.”

(↑ Back to exec attributes)

creates

A file to look for before running the command. The command will only run if the file doesn’t exist.

This parameter doesn’t cause Puppet to create a file; it is only useful if the command itself creates a file.

exec { 'tar -xf /Volumes/nfs02/important.tar':
  cwd     => '/var/tmp',
  creates => '/var/tmp/myfile',
  path    => ['/usr/bin', '/usr/sbin',],
}

In this example, myfile is assumed to be a file inside important.tar. If it is ever deleted, the exec will bring it back by re-extracting the tarball. If important.tar does not actually contain myfile, the exec will keep running every time Puppet runs.

(↑ Back to exec attributes)

cwd

The directory from which to run the command. If this directory does not exist, the command will fail.

(↑ Back to exec attributes)

environment

An array of any additional environment variables you want to set for a command, such as [ 'HOME=/root', 'MAIL=root@example.com']. Note that if you use this to set PATH, it will override the path attribute. Multiple environment variables should be specified as an array.

(↑ Back to exec attributes)

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 commands as different users in the shell.

(↑ Back to exec attributes)

logoutput

Whether to log command output in addition to logging the exit code. Defaults to on_failure, which only logs the output when the command has an exit code that does not match any value specified by the returns attribute. As with any resource type, the log level can be controlled with the loglevel metaparameter.

Valid values are true, false, on_failure.

(↑ Back to exec attributes)

onlyif

A test command that checks the state of the target system and restricts when the exec can run. If present, Puppet runs this test command first, and only runs the main command if the test has an exit code of 0 (success). For example:

exec { 'logrotate':
  path     => '/usr/bin:/usr/sbin:/bin',
  provider => shell,
  onlyif   => 'test `du /var/log/messages | cut -f1` -gt 100000',
}

This would run logrotate only if that test returns true.

Note that this test command runs with the same provider, path, cwd, user, and group as the main command. If the path isn’t set, you must fully qualify the command’s name.

This parameter can also take an array of commands. For example:

onlyif => ['test -f /tmp/file1', 'test -f /tmp/file2'],

This exec would only run if every command in the array has an exit code of 0 (success).

(↑ Back to exec attributes)

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 ‘:’ separated list.

(↑ Back to exec attributes)

provider

The specific backend to use for this exec resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to exec attributes)

refresh

An alternate command to run when the exec receives a refresh event from another resource. By default, Puppet runs the main command again. For more details, see the notes about refresh behavior above, in the description for this resource type.

Note that this alternate command runs with the same provider, path, user, and group as the main command. If the path isn’t set, you must fully qualify the command’s name.

(↑ Back to exec attributes)

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.

(↑ Back to exec attributes)

returns

(Property: This attribute represents concrete state on the target system.)

The expected exit code(s). An error will be returned if the executed command has some other exit code. Defaults to 0. Can be specified as an array of acceptable exit codes or a single value.

On POSIX systems, exit codes are always integers between 0 and 255.

On Windows, most exit codes should be integers between 0 and 2147483647.

Larger exit codes on Windows can behave inconsistently across different tools. The Win32 APIs define exit codes as 32-bit unsigned integers, but both the cmd.exe shell and the .NET runtime cast them to signed integers. This means some tools will report negative numbers for exit codes above 2147483647. (For example, cmd.exe reports 4294967295 as -1.) Since Puppet uses the plain Win32 APIs, it will report the very large number instead of the negative number, which might not be what you expect if you got the exit code from a cmd.exe session.

Microsoft recommends against using negative/very large exit codes, and you should avoid them when possible. To convert a negative exit code to the positive one Puppet will use, add it to 4294967296.

(↑ Back to exec attributes)

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. The timeout is specified in seconds. The default timeout is 300 seconds and you can set it to 0 to disable the timeout.

(↑ Back to exec attributes)

tries

The number of times execution of the command should be tried. Defaults to ‘1’. This many attempts will be made to execute the command until an acceptable return code is returned. Note that the timeout parameter applies to each try rather than to the complete set of tries.

(↑ Back to exec attributes)

try_sleep

The time to sleep in seconds between ‘tries’.

(↑ Back to exec attributes)

umask

Sets the umask to be used while executing this command

(↑ Back to exec attributes)

unless

A test command that checks the state of the target system and restricts when the exec can run. If present, Puppet runs this test command first, then runs the main command unless the test has an exit code of 0 (success). 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 test command runs with the same provider, path, cwd, user, and group as the main command. If the path isn’t set, you must fully qualify the command’s name.

This parameter can also take an array of commands. For example:

unless => ['test -f /tmp/file1', 'test -f /tmp/file2'],

This exec would only run if every command in the array has a non-zero exit code.

(↑ Back to exec attributes)

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.

Please note that the $HOME environment variable is not automatically set when using this attribute.

(↑ Back to exec attributes)

Providers

posix

Executes external binaries directly, without passing through a shell or performing any interpolation. This is a safer and more predictable way to execute most commands, but prevents the use of globbing and shell built-ins (including control logic like “for” and “if” statements).

  • Default for feature == posix.

shell

Passes the provided command through /bin/sh; only available on POSIX systems. This allows the use of shell globbing and built-ins, and does not require that the path to a command be fully-qualified. Although this can be more convenient than the posix provider, it also means that you need to be more careful with escaping; as ever, with great power comes etc. etc.

This provider closely resembles the behavior of the exec type in Puppet 0.25.x.

windows

Execute external binaries on Windows systems. As with the posix provider, this provider directly calls the command with the arguments given, without passing it through a shell or performing any interpolation. To use shell built-ins — that is, to emulate the shell provider on Windows — a command must explicitly invoke the shell:

exec {'echo foo':
  command => 'cmd.exe /c echo "foo"',
}

If no extension is specified for a command, Windows will use the PATHEXT environment variable to locate the executable.

Note on PowerShell scripts: PowerShell’s default restricted execution policy doesn’t allow it to run saved scripts. To run PowerShell scripts, specify the remotesigned execution policy as part of the command:

exec { 'test':
  path    => 'C:/Windows/System32/WindowsPowerShell/v1.0',
  command => 'powershell -executionpolicy remotesigned -file C:/test.ps1',
}
  • Default for operatingsystem == windows.

file

Description

Manages files, including their content, ownership, and permissions.

The file type can manage normal files, directories, and symlinks; the type should be specified in the ensure attribute.

File contents can be managed directly with the content attribute, or downloaded from a remote source using the source attribute; the latter can also be used to recursively serve directories (when the recurse attribute is set to true or local). On Windows, note that file contents are managed in binary mode; Puppet never automatically translates line endings.

Autorequires: If Puppet is managing the user or group that owns a file, the file resource will autorequire them. If Puppet is managing any parent directories of a file, the file resource will autorequire them.

Warning: Enabling recurse on directories containing large numbers of files slows agent runs. To manage file attributes for many files, consider using alternative methods such as the chmod_r, chown_r, or recursive_file_permissions modules from the Forge.

Attributes

file { 'resource title':
  path                    => # (namevar) The path to the file to manage.  Must be fully...
  ensure                  => # Whether the file should exist, and if so what...
  backup                  => # Whether (and how) file content should be backed...
  checksum                => # The checksum type to use when determining...
  checksum_value          => # The checksum of the source contents. Only md5...
  content                 => # The desired contents of a file, as a string...
  ctime                   => # A read-only state to check the file ctime. On...
  force                   => # Perform the file operation even if it will...
  group                   => # Which group should own the file.  Argument can...
  ignore                  => # A parameter which omits action on files matching 
  links                   => # How to handle links during file actions.  During 
  mode                    => # The desired permissions mode for the file, in...
  mtime                   => # A read-only state to check the file mtime. On...
  owner                   => # The user to whom the file should belong....
  provider                => # The specific backend to use for this `file...
  purge                   => # Whether unmanaged files should be purged. This...
  recurse                 => # Whether to recursively manage the _contents_ of...
  recurselimit            => # How far Puppet should descend into...
  replace                 => # Whether to replace a file or symlink that...
  selinux_ignore_defaults => # If this is set then Puppet will not ask SELinux...
  selrange                => # What the SELinux range component of the context...
  selrole                 => # What the SELinux role component of the context...
  seltype                 => # What the SELinux type component of the context...
  seluser                 => # What the SELinux user component of the context...
  show_diff               => # Whether to display differences when the file...
  source                  => # A source file, which will be copied into place...
  source_permissions      => # Whether (and how) Puppet should copy owner...
  sourceselect            => # Whether to copy all valid sources, or just the...
  target                  => # The target for creating a link.  Currently...
  type                    => # A read-only state to check the file...
  validate_cmd            => # A command for validating the file's syntax...
  validate_replacement    => # The replacement string in a `validate_cmd` that...
  # ...plus any applicable metaparameters.
}

path

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The path to the file to manage. Must be fully qualified.

On Windows, the path should include the drive letter and should use / as the separator character (rather than \\).

(↑ Back to file attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

Whether the file should exist, and if so what kind of file it should be. Possible values are present, absent, file, directory, and link.

  • present accepts any form of file existence, and creates a normal file if the file is missing. (The file will have no content unless the content or source attribute is used.)
  • absent ensures the file doesn’t exist, and deletes it if necessary.
  • file ensures it’s a normal file, and enables use of the content or source attribute.
  • directory ensures it’s a directory, and enables use of the source, recurse, recurselimit, ignore, and purge attributes.
  • link ensures the file is a symlink, and requires that you also set the target attribute. Symlinks are supported on all Posix systems and on Windows Vista / 2008 and higher. On Windows, managing symlinks requires Puppet agent’s user account to have the “Create Symbolic Links” privilege; this can be configured in the “User Rights Assignment” section in the Windows policy editor. By default, Puppet agent runs as the Administrator account, which has this privilege.

Puppet avoids destroying directories unless the force attribute is set to true. This means that if a file is currently a directory, setting ensure to anything but directory or present will cause Puppet to skip managing the resource and log either a notice or an error.

There is one other non-standard value for ensure. If you specify the path to another file as the ensure value, it is equivalent to specifying link and using that path as the target:

# Equivalent resources:

file { '/etc/inetd.conf':
  ensure => '/etc/inet/inetd.conf',
}

file { '/etc/inetd.conf':
  ensure => link,
  target => '/etc/inet/inetd.conf',
}

However, we recommend using link and target explicitly, since this behavior can be harder to read and is deprecated as of Puppet 4.3.0.

Valid values are absent (also called false), file, present, directory, link. Values can match /./.

(↑ Back to file attributes)

backup

Whether (and how) file content should be backed up before being replaced. This attribute works best as a resource default in the site manifest (File { backup => main }), so it can affect all file resources.

  • If set to false, file content won’t be backed up.
  • If set to a string beginning with ., such as .puppet-bak, Puppet will use copy the file in the same directory with that value as the extension of the backup. (A value of true is a synonym for .puppet-bak.)
  • If set to any other string, Puppet will try to back up to a filebucket with that title. See the filebucket resource type for more details. (This is the preferred method for backup, since it can be centralized and queried.)

Default value: puppet, which backs up to a filebucket of the same name. (Puppet automatically creates a local filebucket named puppet if one doesn’t already exist.)

Backing up to a local filebucket isn’t particularly useful. If you want to make organized use of backups, you will generally want to use the puppet master server’s filebucket service. This requires declaring a filebucket resource and a resource default for the backup attribute in site.pp:

# /etc/puppetlabs/puppet/manifests/site.pp
filebucket { 'main':
  path   => false,                # This is required for remote filebuckets.
  server => 'puppet.example.com', # Optional; defaults to the configured puppet master.
}

File { backup => main, }

If you are using multiple puppet master servers, you will want to centralize the contents of the filebucket. Either configure your load balancer to direct all filebucket traffic to a single master, or use something like an out-of-band rsync task to synchronize the content on all masters.

(↑ Back to file attributes)

checksum

The checksum type to use when determining whether to replace a file’s contents.

The default checksum type is md5.

Valid values are md5, md5lite, sha224, sha256, sha256lite, sha384, sha512, mtime, ctime, none.

(↑ Back to file attributes)

checksum_value

(Property: This attribute represents concrete state on the target system.)

The checksum of the source contents. Only md5, sha256, sha224, sha384 and sha512 are supported when specifying this parameter. If this parameter is set, source_permissions will be assumed to be false, and ownership and permissions will not be read from source.

(↑ Back to file attributes)

content

(Property: This attribute represents concrete state on the target system.)

The desired contents of a file, as a string. This attribute is mutually exclusive with source and target.

Newlines and tabs can be specified in double-quoted strings using standard escaped syntax — \n for a newline, and \t for a tab.

With very small files, you can construct content strings directly in the manifest…

define resolve($nameserver1, $nameserver2, $domain, $search) {
    $str = "search ${search}
        domain ${domain}
        nameserver ${nameserver1}
        nameserver ${nameserver2}
        "

    file { '/etc/resolv.conf':
      content => $str,
    }
}

…but for larger files, this attribute is more useful when combined with the template or file function.

(↑ Back to file attributes)

ctime

(Property: This attribute represents concrete state on the target system.)

A read-only state to check the file ctime. On most modern *nix-like systems, this is the time of the most recent change to the owner, group, permissions, or content of the file.

(↑ Back to file attributes)

force

Perform the file operation even if it will destroy one or more directories. You must use force in order to:

  • purge subdirectories
  • Replace directories with files or links
  • Remove a directory when ensure => absent

Valid values are true, false, yes, no.

(↑ Back to file attributes)

group

(Property: This attribute represents concrete state on the target system.)

Which group should own the file. Argument can be either a group name or a group ID.

On Windows, a user (such as “Administrator”) can be set as a file’s group and a group (such as “Administrators”) can be set as a file’s owner; however, a file’s owner and group shouldn’t be the same. (If the owner is also the group, files with modes like "0640" will cause log churn, as they will always appear out of sync.)

(↑ Back to file attributes)

ignore

A parameter which omits action on files matching specified patterns during recursion. Uses Ruby’s builtin globbing engine, so shell metacharacters such as [a-z]* are fully supported. Matches that would descend into the directory structure are ignored, such as */*.

(↑ Back to file attributes)

How to handle links during file actions. During file copying, follow will copy the target file instead of the link and manage will copy the link itself. When not copying, manage will manage the link, and follow will manage the file to which the link points.

Valid values are follow, manage.

(↑ Back to file attributes)

mode

(Property: This attribute represents concrete state on the target system.)

The desired permissions mode for the file, in symbolic or numeric notation. This value must be specified as a string; do not use un-quoted numbers to represent file modes.

If the mode is omitted (or explicitly set to undef), Puppet does not enforce permissions on existing files and creates new files with permissions of 0644.

The file type uses traditional Unix permission schemes and translates them to equivalent permissions for systems which represent permissions differently, including Windows. For detailed ACL controls on Windows, you can leave mode unmanaged and use the puppetlabs/acl module.

Numeric modes should use the standard octal notation of <SETUID/SETGID/STICKY><OWNER><GROUP><OTHER> (for example, “0644”).

  • Each of the “owner,” “group,” and “other” digits should be a sum of the permissions for that class of users, where read = 4, write = 2, and execute/search = 1.
  • The setuid/setgid/sticky digit is also a sum, where setuid = 4, setgid = 2, and sticky = 1.
  • The setuid/setgid/sticky digit is optional. If it is absent, Puppet will clear any existing setuid/setgid/sticky permissions. (So to make your intent clear, you should use at least four digits for numeric modes.)
  • When specifying numeric permissions for directories, Puppet sets the search permission wherever the read permission is set.

Symbolic modes should be represented as a string of comma-separated permission clauses, in the form <WHO><OP><PERM>:

  • “Who” should be u (user), g (group), o (other), and/or a (all)
  • “Op” should be = (set exact permissions), + (add select permissions), or - (remove select permissions)
  • “Perm” should be one or more of:
    • r (read)
    • w (write)
    • x (execute/search)
    • t (sticky)
    • s (setuid/setgid)
    • X (execute/search if directory or if any one user can execute)
    • u (user’s current permissions)
    • g (group’s current permissions)
    • o (other’s current permissions)

Thus, mode "0664" could be represented symbolically as either a=r,ug+w or ug=rw,o=r. However, symbolic modes are more expressive than numeric modes: a mode only affects the specified bits, so mode => 'ug+w' will set the user and group write bits, without affecting any other bits.

See the manual page for GNU or BSD chmod for more details on numeric and symbolic modes.

On Windows, permissions are translated as follows:

  • Owner and group names are mapped to Windows SIDs
  • The “other” class of users maps to the “Everyone” SID
  • The read/write/execute permissions map to the FILE_GENERIC_READ, FILE_GENERIC_WRITE, and FILE_GENERIC_EXECUTE access rights; a file’s owner always has the FULL_CONTROL right
  • “Other” users can’t have any permissions a file’s group lacks, and its group can’t have any permissions its owner lacks; that is, “0644” is an acceptable mode, but “0464” is not.

(↑ Back to file attributes)

mtime

(Property: This attribute represents concrete state on the target system.)

A read-only state to check the file mtime. On *nix-like systems, this is the time of the most recent change to the content of the file.

(↑ Back to file attributes)

owner

(Property: This attribute represents concrete state on the target system.)

The user to whom the file should belong. Argument can be a user name or a user ID.

On Windows, a group (such as “Administrators”) can be set as a file’s owner and a user (such as “Administrator”) can be set as a file’s group; however, a file’s owner and group shouldn’t be the same. (If the owner is also the group, files with modes like "0640" will cause log churn, as they will always appear out of sync.)

(↑ Back to file attributes)

provider

The specific backend to use for this file resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to file attributes)

purge

Whether unmanaged files should be purged. This option only makes sense when ensure => directory and recurse => true.

  • When recursively duplicating an entire directory with the source attribute, purge => true will automatically purge any files that are not in the source directory.
  • When managing files in a directory as individual resources, setting purge => true will purge any files that aren’t being specifically managed.

If you have a filebucket configured, the purged files will be uploaded, but if you do not, this will destroy data.

Unless force => true is set, purging will not delete directories, although it will delete the files they contain.

If recurselimit is set and you aren’t using force => true, purging will obey the recursion limit; files in any subdirectories deeper than the limit will be treated as unmanaged and left alone.

Valid values are true, false, yes, no.

(↑ Back to file attributes)

recurse

Whether to recursively manage the contents of a directory. This attribute is only used when ensure => directory is set. The allowed values are:

  • false — The default behavior. The contents of the directory will not be automatically managed.
  • remote — If the source attribute is set, Puppet will automatically manage the contents of the source directory (or directories), ensuring that equivalent files and directories exist on the target system and that their contents match.

    Using remote will disable the purge attribute, but results in faster catalog application than recurse => true.

    The source attribute is mandatory when recurse => remote.

  • true — If the source attribute is set, this behaves similarly to recurse => remote, automatically managing files from the source directory.

    This also enables the purge attribute, which can delete unmanaged files from a directory. See the description of purge for more details.

    The source attribute is not mandatory when using recurse => true, so you can enable purging in directories where all files are managed individually.

By default, setting recurse to remote or true will manage all subdirectories. You can use the recurselimit attribute to limit the recursion depth.

Valid values are true, false, remote.

(↑ Back to file attributes)

recurselimit

How far Puppet should descend into subdirectories, when using ensure => directory and either recurse => true or recurse => remote. The recursion limit affects which files will be copied from the source directory, as well as which files can be purged when purge => true.

Setting recurselimit => 0 is the same as setting recurse => false — Puppet will manage the directory, but all of its contents will be treated as unmanaged.

Setting recurselimit => 1 will manage files and directories that are directly inside the directory, but will not manage the contents of any subdirectories.

Setting recurselimit => 2 will manage the direct contents of the directory, as well as the contents of the first level of subdirectories.

This pattern continues for each incremental value of recurselimit.

Values can match /^[0-9]+$/.

(↑ Back to file attributes)

replace

Whether to replace a file or symlink that already exists on the local system but whose content doesn’t match what the source or content attribute specifies. Setting this to false allows file resources to initialize files without overwriting future changes. Note that this only affects content; Puppet will still manage ownership and permissions. Defaults to true.

Valid values are true, false, yes, no.

(↑ Back to file attributes)

selinux_ignore_defaults

If this is set then Puppet will not ask SELinux (via matchpathcon) to supply defaults for the SELinux attributes (seluser, selrole, seltype, and selrange). In general, you should leave this set at its default and only set it to true when you need Puppet to not try to fix SELinux labels automatically.

Valid values are true, false.

(↑ Back to file attributes)

selrange

(Property: This attribute represents concrete state on the target system.)

What the SELinux range component of the context of the file should be. Any valid SELinux range component is accepted. For example s0 or SystemHigh. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled and that have support for MCS (Multi-Category Security).

(↑ Back to file attributes)

selrole

(Property: This attribute represents concrete state on the target system.)

What the SELinux role component of the context of the file should be. Any valid SELinux role component is accepted. For example role_r. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.

(↑ Back to file attributes)

seltype

(Property: This attribute represents concrete state on the target system.)

What the SELinux type component of the context of the file should be. Any valid SELinux type component is accepted. For example tmp_t. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.

(↑ Back to file attributes)

seluser

(Property: This attribute represents concrete state on the target system.)

What the SELinux user component of the context of the file should be. Any valid SELinux user component is accepted. For example user_u. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.

(↑ Back to file attributes)

show_diff

Whether to display differences when the file changes, defaulting to true. This parameter is useful for files that may contain passwords or other secret data, which might otherwise be included in Puppet reports or other insecure outputs. If the global show_diff setting is false, then no diffs will be shown even if this parameter is true.

Valid values are true, false, yes, no.

(↑ Back to file attributes)

source

A source file, which will be copied into place on the local system. This attribute is mutually exclusive with content and target. Allowed values are:

  • puppet: URIs, which point to files in modules or Puppet file server mount points.
  • Fully qualified paths to locally available files (including files on NFS shares or Windows mapped drives).
  • file: URIs, which behave the same as local file paths.
  • http: URIs, which point to files served by common web servers

The normal form of a puppet: URI is:

puppet:///modules/<MODULE NAME>/<FILE PATH>

This will fetch a file from a module on the Puppet master (or from a local module when using Puppet apply). Given a modulepath of /etc/puppetlabs/code/modules, the example above would resolve to /etc/puppetlabs/code/modules/<MODULE NAME>/files/<FILE PATH>.

Unlike content, the source attribute can be used to recursively copy directories if the recurse attribute is set to true or remote. If a source directory contains symlinks, use the links attribute to specify whether to recreate links or follow them.

HTTP URIs cannot be used to recursively synchronize whole directory trees. It is also not possible to use source_permissions values other than ignore. That’s because HTTP servers do not transfer any metadata that translates to ownership or permission details.

Multiple source values can be specified as an array, and Puppet will use the first source that exists. This can be used to serve different files to different system types:

file { '/etc/nfs.conf':
  source => [
    "puppet:///modules/nfs/conf.${host}",
    "puppet:///modules/nfs/conf.${operatingsystem}",
    'puppet:///modules/nfs/conf'
  ]
}

Alternately, when serving directories recursively, multiple sources can be combined by setting the sourceselect attribute to all.

(↑ Back to file attributes)

source_permissions

Whether (and how) Puppet should copy owner, group, and mode permissions from the source to file resources when the permissions are not explicitly specified. (In all cases, explicit permissions will take precedence.) Valid values are use, use_when_creating, and ignore:

  • ignore (the default) will never apply the owner, group, or mode from the source when managing a file. When creating new files without explicit permissions, the permissions they receive will depend on platform-specific behavior. On POSIX, Puppet will use the umask of the user it is running as. On Windows, Puppet will use the default DACL associated with the user it is running as.
  • use will cause Puppet to apply the owner, group, and mode from the source to any files it is managing.
  • use_when_creating will only apply the owner, group, and mode from the source when creating a file; existing files will not have their permissions overwritten.

Valid values are use, use_when_creating, ignore.

(↑ Back to file attributes)

sourceselect

Whether to copy all valid sources, or just the first one. This parameter only affects recursive directory copies; by default, the first valid source is the only one used, but if this parameter is set to all, then all valid sources will have all of their contents copied to the local system. If a given file exists in more than one source, the version from the earliest source in the list will be used.

Valid values are first, all.

(↑ Back to file attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target for creating a link. Currently, symlinks are the only type supported. This attribute is mutually exclusive with source and content.

Symlink targets can be relative, as well as absolute:

# (Useful on Solaris)
file { '/etc/inetd.conf':
  ensure => link,
  target => 'inet/inetd.conf',
}

Directories of symlinks can be served recursively by instead using the source attribute, setting ensure to directory, and setting the links attribute to manage.

Valid values are notlink. Values can match /./.

(↑ Back to file attributes)

type

(Property: This attribute represents concrete state on the target system.)

A read-only state to check the file type.

(↑ Back to file attributes)

validate_cmd

A command for validating the file’s syntax before replacing it. If Puppet would need to rewrite a file due to new source or content, it will check the new content’s validity first. If validation fails, the file resource will fail.

This command must have a fully qualified path, and should contain a percent (%) token where it would expect an input file. It must exit 0 if the syntax is correct, and non-zero otherwise. The command will be run on the target system while applying the catalog, not on the puppet master.

Example:

file { '/etc/apache2/apache2.conf':
  content      => 'example',
  validate_cmd => '/usr/sbin/apache2 -t -f %',
}

This would replace apache2.conf only if the test returned true.

Note that if a validation command requires a % as part of its text, you can specify a different placeholder token with the validate_replacement attribute.

(↑ Back to file attributes)

validate_replacement

The replacement string in a validate_cmd that will be replaced with an input file name. Defaults to: %

(↑ Back to file attributes)

Providers

posix

Uses POSIX functionality to manage file ownership and permissions.

  • Supported features: manages_symlinks.

windows

Uses Microsoft Windows functionality to manage file ownership and permissions.

  • Supported features: manages_symlinks.

Provider Features

Available features:

  • manages_symlinks — The provider can manage symbolic links.

Provider support:

Provider manages symlinks
posix X
windows X

filebucket

Description

A repository for storing and retrieving file content by MD5 checksum. Can be local to each agent node, or centralized on a puppet master server. All puppet masters provide a filebucket service that agent nodes can access via HTTP, but you must declare a filebucket resource before any agents will do so.

Filebuckets are used for the following features:

  • Content backups. If the file type’s backup attribute is set to the name of a filebucket, Puppet will back up the old content whenever it rewrites a file; see the documentation for the file type for more details. These backups can be used for manual recovery of content, but are more commonly used to display changes and differences in a tool like Puppet Dashboard.

To use a central filebucket for backups, you will usually want to declare a filebucket resource and a resource default for the backup attribute in site.pp:

# /etc/puppetlabs/puppet/manifests/site.pp
filebucket { 'main':
  path   => false,                # This is required for remote filebuckets.
  server => 'puppet.example.com', # Optional; defaults to the configured puppet master.
}

File { backup => main, }

Puppet master servers automatically provide the filebucket service, so this will work in a default configuration. If you have a heavily restricted auth.conf file, you may need to allow access to the file_bucket_file endpoint.

Attributes

filebucket { 'resource title':
  name   => # (namevar) The name of the...
  path   => # The path to the _local_ filebucket; defaults to...
  port   => # The port on which the remote server is...
  server => # The server providing the remote filebucket...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the filebucket.

(↑ Back to filebucket attributes)

path

The path to the local filebucket; defaults to the value of the clientbucketdir setting. To use a remote filebucket, you must set this attribute to false.

(↑ Back to filebucket attributes)

port

The port on which the remote server is listening. Defaults to the value of the masterport setting, which is usually 8140.

(↑ Back to filebucket attributes)

server

The server providing the remote filebucket service. Defaults to the value of the server setting (that is, the currently configured puppet master server).

This setting is only consulted if the path attribute is set to false.

(↑ Back to filebucket attributes)

group

Description

Manage groups. On most platforms this can only create groups. Group membership must be managed on individual users.

On some platforms such as OS X, group membership is managed as an attribute of the group, not the user record. Providers must have the feature ‘manages_members’ to manage the ‘members’ property of a group record.

Attributes

group { 'resource title':
  name                 => # (namevar) The group name. While naming limitations vary by 
  ensure               => # Create or remove the group.  Valid values are...
  allowdupe            => # Whether to allow duplicate GIDs. Defaults to...
  attribute_membership => # AIX only. Configures the behavior of the...
  attributes           => # Specify group AIX attributes, as an array of...
  auth_membership      => # Configures the behavior of the `members...
  forcelocal           => # Forces the management of local accounts when...
  gid                  => # The group ID.  Must be specified numerically....
  ia_load_module       => # The name of the I&A module to use to manage this 
  members              => # The members of the group. For platforms or...
  provider             => # The specific backend to use for this `group...
  system               => # Whether the group is a system group with lower...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The group name. While naming limitations vary by operating system, it is advisable to restrict names to the lowest common denominator, which is a maximum of 8 characters beginning with a letter.

Note that Puppet considers group names to be case-sensitive, regardless of the platform’s own rules; be sure to always use the same case when referring to a given group.

(↑ Back to group attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

Create or remove the group.

Valid values are present, absent.

(↑ Back to group attributes)

allowdupe

Whether to allow duplicate GIDs. Defaults to false.

Valid values are true, false, yes, no.

(↑ Back to group attributes)

attribute_membership

AIX only. Configures the behavior of the attributes parameter.

  • minimum (default) — The provided list of attributes is partial, and Puppet ignores any attributes that aren’t listed there.
  • inclusive — The provided list of attributes is comprehensive, and Puppet purges any attributes that aren’t listed there.

Valid values are inclusive, minimum.

(↑ Back to group attributes)

attributes

(Property: This attribute represents concrete state on the target system.)

Specify group AIX attributes, as an array of 'key=value' strings. This parameter’s behavior can be configured with attribute_membership.

Requires features manages_aix_lam.

(↑ Back to group attributes)

auth_membership

Configures the behavior of the members parameter.

  • false (default) — The provided list of group members is partial, and Puppet ignores any members that aren’t listed there.
  • true — The provided list of of group members is comprehensive, and Puppet purges any members that aren’t listed there.

Valid values are true, false, yes, no.

(↑ Back to group attributes)

forcelocal

Forces the management of local accounts when accounts are also being managed by some other NSS

Valid values are true, false, yes, no.

Requires features libuser.

(↑ Back to group attributes)

gid

(Property: This attribute represents concrete state on the target system.)

The group ID. Must be specified numerically. If no group ID is specified when creating a new group, then one will be chosen automatically according to local system standards. This will likely result in the same group having different GIDs on different systems, which is not recommended.

On Windows, this property is read-only and will return the group’s security identifier (SID).

(↑ Back to group attributes)

ia_load_module

The name of the I&A module to use to manage this user

Requires features manages_aix_lam.

(↑ Back to group attributes)

members

(Property: This attribute represents concrete state on the target system.)

The members of the group. For platforms or directory services where group membership is stored in the group objects, not the users. This parameter’s behavior can be configured with auth_membership.

Requires features manages_members.

(↑ Back to group attributes)

provider

The specific backend to use for this group resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to group attributes)

system

Whether the group is a system group with lower GID.

Valid values are true, false, yes, no.

(↑ Back to group attributes)

Providers

aix

Group management for AIX.

  • Required binaries: /usr/bin/chgroup, /usr/bin/mkgroup, /usr/sbin/lsgroup, /usr/sbin/rmgroup.
  • Default for operatingsystem == aix.
  • Supported features: manages_aix_lam, manages_members.

directoryservice

Group management using DirectoryService on OS X.

  • Required binaries: /usr/bin/dscl.
  • Default for operatingsystem == darwin.
  • Supported features: manages_members.

groupadd

Group management via groupadd and its ilk. The default for most platforms.

  • Required binaries: groupadd, groupdel, groupmod, lgroupadd, lgroupdel, lgroupmod.
  • Supported features: system_groups.

ldap

Group management via LDAP.

This provider requires that you have valid values for all of the LDAP-related settings in puppet.conf, including ldapbase. You will almost definitely need settings for ldapuser and ldappassword in order for your clients to 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.

pw

Group management via pw on FreeBSD and DragonFly BSD.

  • Required binaries: pw.
  • Default for operatingsystem == freebsd, dragonfly.
  • Supported features: manages_members.

windows_adsi

Local group management for Windows. Group members can be both users and groups. Additionally, local groups can contain domain users.

  • Default for operatingsystem == windows.
  • Supported features: manages_members.

Provider Features

Available features:

  • libuser — Allows local groups to be managed on systems that also use some other remote NSS method of managing accounts.
  • manages_aix_lam — The provider can manage AIX Loadable Authentication Module (LAM) system.
  • manages_members — For directories where membership is an attribute of groups not users.
  • system_groups — The provider allows you to create system groups with lower GIDs.

Provider support:

Provider libuser manages aix lam manages members system groups
aix X X
directoryservice X
groupadd X X
ldap
pw X
windows_adsi X

host

Description

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.

Attributes

host { 'resource title':
  name         => # (namevar) The host...
  ensure       => # The basic property that the resource should be...
  comment      => # A comment that will be attached to the line with 
  host_aliases => # Any aliases the host might have.  Multiple...
  ip           => # The host's IP address, IPv4 or...
  provider     => # The specific backend to use for this `host...
  target       => # The file in which to store service information.  
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The host name.

(↑ Back to host attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to host attributes)

comment

(Property: This attribute represents concrete state on the target system.)

A comment that will be attached to the line with a # character.

(↑ Back to host attributes)

host_aliases

(Property: This attribute represents concrete state on the target system.)

Any aliases the host might have. Multiple values must be specified as an array.

(↑ Back to host attributes)

ip

(Property: This attribute represents concrete state on the target system.)

The host’s IP address, IPv4 or IPv6.

(↑ Back to host attributes)

provider

The specific backend to use for this host resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to host attributes)

target

(Property: This attribute represents concrete state on the target system.)

The file in which to store service information. Only used by those providers that write to disk. On most systems this defaults to /etc/hosts.

(↑ Back to host attributes)

Providers

parsed

interface

Description

This represents a router or switch interface. It is possible to manage interface mode (access or trunking, native vlan and encapsulation) and switchport characteristics (speed, duplex).

Attributes

interface { 'resource title':
  name                => # (namevar) The interface's...
  ensure              => # The basic property that the resource should be...
  access_vlan         => # Interface static access vlan.  Values can match...
  allowed_trunk_vlans => # Allowed list of Vlans that this trunk can...
  description         => # Interface...
  device_url          => # The URL at which the router or switch can be...
  duplex              => # Interface duplex.  Valid values are `auto`...
  encapsulation       => # Interface switchport encapsulation.  Valid...
  etherchannel        => # Channel group this interface is part of.  Values 
  ipaddress           => # IP Address of this interface. Note that it might 
  mode                => # Interface switchport mode.  Valid values are...
  native_vlan         => # Interface native vlan when trunking.  Values can 
  provider            => # The specific backend to use for this `interface` 
  speed               => # Interface speed.  Valid values are `auto`...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The interface’s name.

(↑ Back to interface attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present (also called no_shutdown), absent (also called shutdown).

(↑ Back to interface attributes)

access_vlan

(Property: This attribute represents concrete state on the target system.)

Interface static access vlan.

Values can match /^\d+/.

(↑ Back to interface attributes)

allowed_trunk_vlans

(Property: This attribute represents concrete state on the target system.)

Allowed list of Vlans that this trunk can forward.

Valid values are all. Values can match /./.

(↑ Back to interface attributes)

description

(Property: This attribute represents concrete state on the target system.)

Interface description.

(↑ Back to interface attributes)

device_url

The URL at which the router or switch can be reached.

(↑ Back to interface attributes)

duplex

(Property: This attribute represents concrete state on the target system.)

Interface duplex.

Valid values are auto, full, half.

(↑ Back to interface attributes)

encapsulation

(Property: This attribute represents concrete state on the target system.)

Interface switchport encapsulation.

Valid values are none, dot1q, isl, negotiate.

(↑ Back to interface attributes)

etherchannel

(Property: This attribute represents concrete state on the target system.)

Channel group this interface is part of.

Values can match /^\d+/.

(↑ Back to interface attributes)

ipaddress

(Property: This attribute represents concrete state on the target system.)

IP Address of this interface. Note that it might not be possible to set an interface IP address; it depends on the interface type and device type.

Valid format of ip addresses are:

  • IPV4, like 127.0.0.1
  • IPV4/prefixlength like 127.0.1.1/24
  • IPV6/prefixlength like FE80::21A:2FFF:FE30:ECF0/128
  • an optional suffix for IPV6 addresses from this list: eui-64, link-local

It is also possible to supply an array of values.

(↑ Back to interface attributes)

mode

(Property: This attribute represents concrete state on the target system.)

Interface switchport mode.

Valid values are access, trunk, dynamic auto, dynamic desirable.

(↑ Back to interface attributes)

native_vlan

(Property: This attribute represents concrete state on the target system.)

Interface native vlan when trunking.

Values can match /^\d+/.

(↑ Back to interface attributes)

provider

The specific backend to use for this interface resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to interface attributes)

speed

(Property: This attribute represents concrete state on the target system.)

Interface speed.

Valid values are auto. Values can match /^\d+/.

(↑ Back to interface attributes)

Providers

cisco

Cisco switch/router provider for interface.

k5login

Description

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 principals attribute.

Attributes

k5login { 'resource title':
  path       => # (namevar) The path to the `.k5login` file to manage.  Must 
  ensure     => # The basic property that the resource should be...
  mode       => # The desired permissions mode of the `.k5login...
  principals => # The principals present in the `.k5login` file...
  provider   => # The specific backend to use for this `k5login...
  selrange   => # What the SELinux range component of the context...
  selrole    => # What the SELinux role component of the context...
  seltype    => # What the SELinux type component of the context...
  seluser    => # What the SELinux user component of the context...
  # ...plus any applicable metaparameters.
}

path

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The path to the .k5login file to manage. Must be fully qualified.

(↑ Back to k5login attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to k5login attributes)

mode

(Property: This attribute represents concrete state on the target system.)

The desired permissions mode of the .k5login file. Defaults to 644.

(↑ Back to k5login attributes)

principals

(Property: This attribute represents concrete state on the target system.)

The principals present in the .k5login file. This should be specified as an array.

(↑ Back to k5login attributes)

provider

The specific backend to use for this k5login resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to k5login attributes)

selrange

(Property: This attribute represents concrete state on the target system.)

What the SELinux range component of the context of the file should be. Any valid SELinux range component is accepted. For example s0 or SystemHigh. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled and that have support for MCS (Multi-Category Security).

(↑ Back to k5login attributes)

selrole

(Property: This attribute represents concrete state on the target system.)

What the SELinux role component of the context of the file should be. Any valid SELinux role component is accepted. For example role_r. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.

(↑ Back to k5login attributes)

seltype

(Property: This attribute represents concrete state on the target system.)

What the SELinux type component of the context of the file should be. Any valid SELinux type component is accepted. For example tmp_t. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.

(↑ Back to k5login attributes)

seluser

(Property: This attribute represents concrete state on the target system.)

What the SELinux user component of the context of the file should be. Any valid SELinux user component is accepted. For example user_u. If not specified it defaults to the value returned by matchpathcon for the file, if any exists. Only valid on systems with SELinux support enabled.

(↑ Back to k5login attributes)

Providers

k5login

The k5login provider is the only provider for the k5login type.

macauthorization

Description

Manage the Mac OS X authorization database. See the Apple developer site for more information.

Note that authorization store directives with hyphens in their names have been renamed to use underscores, as Puppet does not react well to hyphens in identifiers.

Autorequires: If Puppet is managing the /etc/authorization file, each macauthorization resource will autorequire it.

Attributes

macauthorization { 'resource title':
  name              => # (namevar) The name of the right or rule to be managed...
  ensure            => # The basic property that the resource should be...
  allow_root        => # Corresponds to `allow-root` in the authorization 
  auth_class        => # Corresponds to `class` in the authorization...
  auth_type         => # Type --- this can be a `right` or a `rule`. The...
  authenticate_user => # Corresponds to `authenticate-user` in the...
  comment           => # The `comment` attribute for authorization...
  group             => # A group which the user must authenticate as a...
  k_of_n            => # How large a subset of rule mechanisms must...
  mechanisms        => # An array of suitable...
  provider          => # The specific backend to use for this...
  rule              => # The rule(s) that this right refers...
  session_owner     => # Whether the session owner automatically matches...
  shared            => # Whether the Security Server should mark the...
  timeout           => # The number of seconds in which the credential...
  tries             => # The number of tries...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the right or rule to be managed. Corresponds to key in Authorization Services. The key is the name of a rule. A key uses the same naming conventions as a right. The Security Server uses a rule’s key to match the rule with a right. Wildcard keys end with a ‘.’. The generic rule has an empty key value. Any rights that do not match a specific rule use the generic rule.

(↑ Back to macauthorization attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to macauthorization attributes)

allow_root

(Property: This attribute represents concrete state on the target system.)

Corresponds to allow-root in the authorization store. Specifies whether a right should be allowed automatically if the requesting process is running with uid == 0. AuthorizationServices defaults this attribute to false if not specified.

Valid values are true, false.

(↑ Back to macauthorization attributes)

auth_class

(Property: This attribute represents concrete state on the target system.)

Corresponds to class in the authorization store; renamed due to ‘class’ being a reserved word in Puppet.

Valid values are user, evaluate-mechanisms, allow, deny, rule.

(↑ Back to macauthorization attributes)

auth_type

(Property: This attribute represents concrete state on the target system.)

Type — this can be a right or a rule. The comment type has not yet been implemented.

Valid values are right, rule.

(↑ Back to macauthorization attributes)

authenticate_user

(Property: This attribute represents concrete state on the target system.)

Corresponds to authenticate-user in the authorization store.

Valid values are true, false.

(↑ Back to macauthorization attributes)

comment

(Property: This attribute represents concrete state on the target system.)

The comment attribute for authorization resources.

(↑ Back to macauthorization attributes)

group

(Property: This attribute represents concrete state on the target system.)

A group which the user must authenticate as a member of. This must be a single group.

(↑ Back to macauthorization attributes)

k_of_n

(Property: This attribute represents concrete state on the target system.)

How large a subset of rule mechanisms must succeed for successful authentication. If there are ‘n’ mechanisms, then ‘k’ (the integer value of this parameter) mechanisms must succeed. The most common setting for this parameter is 1. If k-of-n is not set, then every mechanism — that is, ‘n-of-n’ — must succeed.

(↑ Back to macauthorization attributes)

mechanisms

(Property: This attribute represents concrete state on the target system.)

An array of suitable mechanisms.

(↑ Back to macauthorization attributes)

provider

The specific backend to use for this macauthorization resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to macauthorization attributes)

rule

(Property: This attribute represents concrete state on the target system.)

The rule(s) that this right refers to.

(↑ Back to macauthorization attributes)

session_owner

(Property: This attribute represents concrete state on the target system.)

Whether the session owner automatically matches this rule or right. Corresponds to session-owner in the authorization store.

Valid values are true, false.

(↑ Back to macauthorization attributes)

shared

(Property: This attribute represents concrete state on the target system.)

Whether the Security Server should mark the credentials used to gain this right as shared. The Security Server may use any shared credentials to authorize this right. For maximum security, set sharing to false so credentials stored by the Security Server for one application may not be used by another application.

Valid values are true, false.

(↑ Back to macauthorization attributes)

timeout

(Property: This attribute represents concrete state on the target system.)

The number of seconds in which the credential used by this rule will expire. For maximum security where the user must authenticate every time, set the timeout to 0. For minimum security, remove the timeout attribute so the user authenticates only once per session.

(↑ Back to macauthorization attributes)

tries

(Property: This attribute represents concrete state on the target system.)

The number of tries allowed.

(↑ Back to macauthorization attributes)

Providers

macauthorization

Manage Mac OS X authorization database rules and rights.

  • Required binaries: /usr/bin/security.
  • Default for operatingsystem == darwin.

mailalias

Description

Creates an email alias in the local alias database.

Attributes

mailalias { 'resource title':
  name      => # (namevar) The alias...
  ensure    => # The basic property that the resource should be...
  file      => # A file containing the alias's contents.  The...
  provider  => # The specific backend to use for this `mailalias` 
  recipient => # Where email should be sent.  Multiple values...
  target    => # The file in which to store the aliases.  Only...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The alias name.

(↑ Back to mailalias attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to mailalias attributes)

file

(Property: This attribute represents concrete state on the target system.)

A file containing the alias’s contents. The file and the recipient entries are mutually exclusive.

(↑ Back to mailalias attributes)

provider

The specific backend to use for this mailalias resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to mailalias attributes)

recipient

(Property: This attribute represents concrete state on the target system.)

Where email should be sent. Multiple values should be specified as an array. The file and the recipient entries are mutually exclusive.

(↑ Back to mailalias attributes)

target

(Property: This attribute represents concrete state on the target system.)

The file in which to store the aliases. Only used by those providers that write to disk.

(↑ Back to mailalias attributes)

Providers

aliases

maillist

Description

Manage email lists. This resource type can only create and remove lists; it cannot currently reconfigure them.

Attributes

maillist { 'resource title':
  name        => # (namevar) The name of the email...
  ensure      => # The basic property that the resource should be...
  admin       => # The email address of the...
  description => # The description of the mailing...
  mailserver  => # The name of the host handling email for the...
  password    => # The admin...
  provider    => # The specific backend to use for this `maillist...
  webserver   => # The name of the host providing web archives and...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the email list.

(↑ Back to maillist attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent, purged.

(↑ Back to maillist attributes)

admin

The email address of the administrator.

(↑ Back to maillist attributes)

description

The description of the mailing list.

(↑ Back to maillist attributes)

mailserver

The name of the host handling email for the list.

(↑ Back to maillist attributes)

password

The admin password.

(↑ Back to maillist attributes)

provider

The specific backend to use for this maillist resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to maillist attributes)

webserver

The name of the host providing web archives and the administrative interface.

(↑ Back to maillist attributes)

Providers

mailman

  • Required binaries: /var/lib/mailman/mail/mailman, list_lists, newlist, rmlist.

mcx

Description

MCX object management using DirectoryService on OS X.

The default provider of this type merely manages the XML plist as reported by the dscl -mcxexport command. This is similar to the content property of the file type in Puppet.

The recommended method of using this type is to use Work Group Manager to manage users and groups on the local computer, record the resulting puppet manifest using the command puppet resource mcx, then deploy it to other machines.

Autorequires: If Puppet is managing the user, group, or computer that these MCX settings refer to, the MCX resource will autorequire that user, group, or computer.

Attributes

mcx { 'resource title':
  name     => # (namevar) The name of the resource being managed. The...
  ensure   => # Create or remove the MCX setting.  Valid values...
  content  => # The XML Plist used as the value of MCXSettings...
  ds_name  => # The name to attach the MCX Setting to. (For...
  ds_type  => # The DirectoryService type this MCX setting...
  provider => # The specific backend to use for this `mcx...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the resource being managed. The default naming convention follows Directory Service paths:

/Computers/localhost
/Groups/admin
/Users/localadmin

The ds_type and ds_name type parameters are not necessary if the default naming convention is followed.

(↑ Back to mcx attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

Create or remove the MCX setting.

Valid values are present, absent.

(↑ Back to mcx attributes)

content

(Property: This attribute represents concrete state on the target system.)

The XML Plist used as the value of MCXSettings in DirectoryService. This is the standard output from the system command:

dscl localhost -mcxexport /Local/Default/<ds_type>/ds_name

Note that ds_type is capitalized and plural in the dscl command.

Requires features manages_content.

(↑ Back to mcx attributes)

ds_name

The name to attach the MCX Setting to. (For example, localhost when ds_type => computer.) This setting is not required, as it can be automatically discovered when the resource name is parseable. (For example, in /Groups/admin, group will be used as the dstype.)

(↑ Back to mcx attributes)

ds_type

The DirectoryService type this MCX setting attaches to.

Valid values are user, group, computer, computerlist.

(↑ Back to mcx attributes)

provider

The specific backend to use for this mcx resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to mcx attributes)

Providers

mcxcontent

MCX Settings management using DirectoryService on OS X.

This provider manages the entire MCXSettings attribute available to some directory services nodes. This management is ‘all or nothing’ in that discrete application domain key value pairs are not managed by this provider.

It is recommended to use WorkGroup Manager to configure Users, Groups, Computers, or ComputerLists, then use ‘ralsh mcx’ to generate a puppet manifest from the resulting configuration.

Original Author: Jeff McCune (mccune.jeff@gmail.com)

  • Required binaries: /usr/bin/dscl.
  • Default for operatingsystem == darwin.
  • Supported features: manages_content.

Provider Features

Available features:

  • manages_content — The provider can manage MCXSettings as a string.

Provider support:

Provider manages content
mcxcontent X

mount

Description

Manages mounted filesystems, including putting mount information into the mount table. The actual behavior depends on the value of the ‘ensure’ parameter.

Refresh: mount resources can respond to refresh events (via notify, subscribe, or the ~> arrow). If a mount receives an event from another resource and its ensure attribute is set to mounted, Puppet will try to unmount then remount that filesystem.

Autorequires: If Puppet is managing any parents of a mount resource — that is, other mount points higher up in the filesystem — the child mount will autorequire them.

Autobefores: If Puppet is managing any child file paths of a mount point, the mount resource will autobefore them.

Attributes

mount { 'resource title':
  name        => # (namevar) The mount path for the...
  ensure      => # Control what to do with this mount. Set this...
  atboot      => # Whether to mount the mount at boot.  Not all...
  blockdevice => # The device to fsck.  This is property is only...
  device      => # The device providing the mount.  This can be...
  dump        => # Whether to dump the mount.  Not all platform...
  fstype      => # The mount type.  Valid values depend on the...
  options     => # A single string containing options for the...
  pass        => # The pass in which the mount is...
  provider    => # The specific backend to use for this `mount...
  remounts    => # Whether the mount can be remounted  `mount -o...
  target      => # The file in which to store the mount table....
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The mount path for the mount.

(↑ Back to mount attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

Control what to do with this mount. Set this attribute to unmounted 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. Set to present to add to fstab but not change mount/unmount status.

Valid values are defined (also called present), unmounted, absent, mounted.

(↑ Back to mount attributes)

atboot

(Property: This attribute represents concrete state on the target system.)

Whether to mount the mount at boot. Not all platforms support this.

(↑ Back to mount attributes)

blockdevice

(Property: This attribute represents concrete state on the target system.)

The device to fsck. This is property is only valid on Solaris, and in most cases will default to the correct value.

(↑ Back to mount attributes)

device

(Property: This attribute represents concrete state on the target system.)

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.

(↑ Back to mount attributes)

dump

(Property: This attribute represents concrete state on the target system.)

Whether to dump the mount. Not all platform support this. Valid values are 1 or 0 (or 2 on FreeBSD). Default is 0.

Values can match /(0|1)/.

(↑ Back to mount attributes)

fstype

(Property: This attribute represents concrete state on the target system.)

The mount type. Valid values depend on the operating system. This is a required option.

(↑ Back to mount attributes)

options

(Property: This attribute represents concrete state on the target system.)

A single string containing options for the mount, as they would appear in fstab on Linux. For many platforms this is a comma-delimited string. Consult the fstab(5) man page for system-specific details. AIX options other than dev, nodename, or vfs can be defined here. If specified, AIX options of account, boot, check, free, mount, size, type, vol, log, and quota must be ordered alphabetically at the end of the list.

(↑ Back to mount attributes)

pass

(Property: This attribute represents concrete state on the target system.)

The pass in which the mount is checked.

(↑ Back to mount attributes)

provider

The specific backend to use for this mount resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to mount attributes)

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.

(↑ Back to mount attributes)

target

(Property: This attribute represents concrete state on the target system.)

The file in which to store the mount table. Only used by those providers that write to disk.

(↑ Back to mount attributes)

Providers

parsed

  • Required binaries: mount, umount.
  • Supported features: refreshable.

Provider Features

Available features:

  • refreshable — The provider can remount the filesystem.

Provider support:

Provider refreshable
parsed X

nagios_command

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_command { 'resource title':
  command_name => # (namevar) The name of this nagios_command...
  ensure       => # The basic property that the resource should be...
  command_line => # Nagios configuration file...
  group        => # The desired group of the config file for this...
  mode         => # The desired mode of the config file for this...
  owner        => # The desired owner of the config file for this...
  poller_tag   => # Nagios configuration file...
  provider     => # The specific backend to use for this...
  target       => # The...
  use          => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

command_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_command resource.

(↑ Back to nagios_command attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_command attributes)

command_line

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_command attributes)

group

The desired group of the config file for this nagios_command resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_command attributes)

mode

The desired mode of the config file for this nagios_command resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_command attributes)

owner

The desired owner of the config file for this nagios_command resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_command attributes)

poller_tag

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_command attributes)

provider

The specific backend to use for this nagios_command resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_command attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_command attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_command attributes)

Providers

naginator

nagios_contact

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_contact { 'resource title':
  contact_name                  => # (namevar) The name of this nagios_contact...
  ensure                        => # The basic property that the resource should be...
  address1                      => # Nagios configuration file...
  address2                      => # Nagios configuration file...
  address3                      => # Nagios configuration file...
  address4                      => # Nagios configuration file...
  address5                      => # Nagios configuration file...
  address6                      => # Nagios configuration file...
  alias                         => # Nagios configuration file...
  can_submit_commands           => # Nagios configuration file...
  contactgroups                 => # Nagios configuration file...
  email                         => # Nagios configuration file...
  group                         => # The desired group of the config file for this...
  host_notification_commands    => # Nagios configuration file...
  host_notification_options     => # Nagios configuration file...
  host_notification_period      => # Nagios configuration file...
  host_notifications_enabled    => # Nagios configuration file...
  mode                          => # The desired mode of the config file for this...
  owner                         => # The desired owner of the config file for this...
  pager                         => # Nagios configuration file...
  provider                      => # The specific backend to use for this...
  register                      => # Nagios configuration file...
  retain_nonstatus_information  => # Nagios configuration file...
  retain_status_information     => # Nagios configuration file...
  service_notification_commands => # Nagios configuration file...
  service_notification_options  => # Nagios configuration file...
  service_notification_period   => # Nagios configuration file...
  service_notifications_enabled => # Nagios configuration file...
  target                        => # The...
  use                           => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

contact_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_contact resource.

(↑ Back to nagios_contact attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_contact attributes)

address1

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

address2

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

address3

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

address4

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

address5

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

address6

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

alias

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

can_submit_commands

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

contactgroups

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

email

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

group

The desired group of the config file for this nagios_contact resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_contact attributes)

host_notification_commands

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

host_notification_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

host_notification_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

host_notifications_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

mode

The desired mode of the config file for this nagios_contact resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_contact attributes)

owner

The desired owner of the config file for this nagios_contact resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_contact attributes)

pager

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

provider

The specific backend to use for this nagios_contact resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_contact attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

retain_nonstatus_information

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

retain_status_information

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

service_notification_commands

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

service_notification_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

service_notification_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

service_notifications_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_contact attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contact attributes)

Providers

naginator

nagios_contactgroup

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_contactgroup { 'resource title':
  contactgroup_name    => # (namevar) The name of this nagios_contactgroup...
  ensure               => # The basic property that the resource should be...
  alias                => # Nagios configuration file...
  contactgroup_members => # Nagios configuration file...
  group                => # The desired group of the config file for this...
  members              => # Nagios configuration file...
  mode                 => # The desired mode of the config file for this...
  owner                => # The desired owner of the config file for this...
  provider             => # The specific backend to use for this...
  register             => # Nagios configuration file...
  target               => # The...
  use                  => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

contactgroup_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_contactgroup resource.

(↑ Back to nagios_contactgroup attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_contactgroup attributes)

alias

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contactgroup attributes)

contactgroup_members

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contactgroup attributes)

group

The desired group of the config file for this nagios_contactgroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_contactgroup attributes)

members

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contactgroup attributes)

mode

The desired mode of the config file for this nagios_contactgroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_contactgroup attributes)

owner

The desired owner of the config file for this nagios_contactgroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_contactgroup attributes)

provider

The specific backend to use for this nagios_contactgroup resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_contactgroup attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contactgroup attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_contactgroup attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_contactgroup attributes)

Providers

naginator

nagios_host

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_host { 'resource title':
  host_name                    => # (namevar) The name of this nagios_host...
  ensure                       => # The basic property that the resource should be...
  action_url                   => # Nagios configuration file...
  active_checks_enabled        => # Nagios configuration file...
  address                      => # Nagios configuration file...
  alias                        => # Nagios configuration file...
  business_impact              => # Nagios configuration file...
  check_command                => # Nagios configuration file...
  check_freshness              => # Nagios configuration file...
  check_interval               => # Nagios configuration file...
  check_period                 => # Nagios configuration file...
  contact_groups               => # Nagios configuration file...
  contacts                     => # Nagios configuration file...
  display_name                 => # Nagios configuration file...
  event_handler                => # Nagios configuration file...
  event_handler_enabled        => # Nagios configuration file...
  failure_prediction_enabled   => # Nagios configuration file...
  first_notification_delay     => # Nagios configuration file...
  flap_detection_enabled       => # Nagios configuration file...
  flap_detection_options       => # Nagios configuration file...
  freshness_threshold          => # Nagios configuration file...
  group                        => # The desired group of the config file for this...
  high_flap_threshold          => # Nagios configuration file...
  hostgroups                   => # Nagios configuration file...
  icon_image                   => # Nagios configuration file...
  icon_image_alt               => # Nagios configuration file...
  initial_state                => # Nagios configuration file...
  low_flap_threshold           => # Nagios configuration file...
  max_check_attempts           => # Nagios configuration file...
  mode                         => # The desired mode of the config file for this...
  notes                        => # Nagios configuration file...
  notes_url                    => # Nagios configuration file...
  notification_interval        => # Nagios configuration file...
  notification_options         => # Nagios configuration file...
  notification_period          => # Nagios configuration file...
  notifications_enabled        => # Nagios configuration file...
  obsess_over_host             => # Nagios configuration file...
  owner                        => # The desired owner of the config file for this...
  parents                      => # Nagios configuration file...
  passive_checks_enabled       => # Nagios configuration file...
  poller_tag                   => # Nagios configuration file...
  process_perf_data            => # Nagios configuration file...
  provider                     => # The specific backend to use for this...
  realm                        => # Nagios configuration file...
  register                     => # Nagios configuration file...
  retain_nonstatus_information => # Nagios configuration file...
  retain_status_information    => # Nagios configuration file...
  retry_interval               => # Nagios configuration file...
  stalking_options             => # Nagios configuration file...
  statusmap_image              => # Nagios configuration file...
  target                       => # The...
  use                          => # Nagios configuration file...
  vrml_image                   => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

host_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_host resource.

(↑ Back to nagios_host attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_host attributes)

action_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

active_checks_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

address

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

alias

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

business_impact

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

check_command

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

check_freshness

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

check_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

check_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

contact_groups

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

contacts

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

display_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

event_handler

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

event_handler_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

failure_prediction_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

first_notification_delay

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

flap_detection_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

flap_detection_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

freshness_threshold

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

group

The desired group of the config file for this nagios_host resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_host attributes)

high_flap_threshold

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

hostgroups

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

icon_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

icon_image_alt

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

initial_state

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

low_flap_threshold

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

max_check_attempts

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

mode

The desired mode of the config file for this nagios_host resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_host attributes)

notes

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

notes_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

notification_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

notification_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

notification_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

notifications_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

obsess_over_host

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

owner

The desired owner of the config file for this nagios_host resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_host attributes)

parents

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

passive_checks_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

poller_tag

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

process_perf_data

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

provider

The specific backend to use for this nagios_host resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_host attributes)

realm

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

retain_nonstatus_information

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

retain_status_information

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

retry_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

stalking_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

statusmap_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_host attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

vrml_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_host attributes)

Providers

naginator

nagios_hostdependency

Description

The Nagios type hostdependency. 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_hostdependency.cfg, but you can send them to a different file by setting their target attribute.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_hostdependency { 'resource title':
  _naginator_name               => # (namevar) The name of this nagios_hostdependency...
  ensure                        => # The basic property that the resource should be...
  dependency_period             => # Nagios configuration file...
  dependent_host_name           => # Nagios configuration file...
  dependent_hostgroup_name      => # Nagios configuration file...
  execution_failure_criteria    => # Nagios configuration file...
  group                         => # The desired group of the config file for this...
  host_name                     => # Nagios configuration file...
  hostgroup_name                => # Nagios configuration file...
  inherits_parent               => # Nagios configuration file...
  mode                          => # The desired mode of the config file for this...
  notification_failure_criteria => # Nagios configuration file...
  owner                         => # The desired owner of the config file for this...
  provider                      => # The specific backend to use for this...
  register                      => # Nagios configuration file...
  target                        => # The...
  use                           => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

_naginator_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_hostdependency resource.

(↑ Back to nagios_hostdependency attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_hostdependency attributes)

dependency_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

dependent_host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

dependent_hostgroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

execution_failure_criteria

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

group

The desired group of the config file for this nagios_hostdependency resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostdependency attributes)

host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

hostgroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

inherits_parent

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

mode

The desired mode of the config file for this nagios_hostdependency resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostdependency attributes)

notification_failure_criteria

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

owner

The desired owner of the config file for this nagios_hostdependency resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostdependency attributes)

provider

The specific backend to use for this nagios_hostdependency resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_hostdependency attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_hostdependency attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostdependency attributes)

Providers

naginator

nagios_hostescalation

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_hostescalation { 'resource title':
  _naginator_name       => # (namevar) The name of this nagios_hostescalation...
  ensure                => # The basic property that the resource should be...
  contact_groups        => # Nagios configuration file...
  contacts              => # Nagios configuration file...
  escalation_options    => # Nagios configuration file...
  escalation_period     => # Nagios configuration file...
  first_notification    => # Nagios configuration file...
  group                 => # The desired group of the config file for this...
  host_name             => # Nagios configuration file...
  hostgroup_name        => # Nagios configuration file...
  last_notification     => # Nagios configuration file...
  mode                  => # The desired mode of the config file for this...
  notification_interval => # Nagios configuration file...
  owner                 => # The desired owner of the config file for this...
  provider              => # The specific backend to use for this...
  register              => # Nagios configuration file...
  target                => # The...
  use                   => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

_naginator_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_hostescalation resource.

(↑ Back to nagios_hostescalation attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_hostescalation attributes)

contact_groups

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

contacts

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

escalation_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

escalation_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

first_notification

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

group

The desired group of the config file for this nagios_hostescalation resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostescalation attributes)

host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

hostgroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

last_notification

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

mode

The desired mode of the config file for this nagios_hostescalation resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostescalation attributes)

notification_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

owner

The desired owner of the config file for this nagios_hostescalation resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostescalation attributes)

provider

The specific backend to use for this nagios_hostescalation resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_hostescalation attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_hostescalation attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostescalation attributes)

Providers

naginator

nagios_hostextinfo

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_hostextinfo { 'resource title':
  host_name       => # (namevar) The name of this nagios_hostextinfo...
  ensure          => # The basic property that the resource should be...
  group           => # The desired group of the config file for this...
  icon_image      => # Nagios configuration file...
  icon_image_alt  => # Nagios configuration file...
  mode            => # The desired mode of the config file for this...
  notes           => # Nagios configuration file...
  notes_url       => # Nagios configuration file...
  owner           => # The desired owner of the config file for this...
  provider        => # The specific backend to use for this...
  register        => # Nagios configuration file...
  statusmap_image => # Nagios configuration file...
  target          => # The...
  use             => # Nagios configuration file...
  vrml_image      => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

host_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_hostextinfo resource.

(↑ Back to nagios_hostextinfo attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_hostextinfo attributes)

group

The desired group of the config file for this nagios_hostextinfo resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostextinfo attributes)

icon_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

icon_image_alt

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

mode

The desired mode of the config file for this nagios_hostextinfo resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostextinfo attributes)

notes

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

notes_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

owner

The desired owner of the config file for this nagios_hostextinfo resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostextinfo attributes)

provider

The specific backend to use for this nagios_hostextinfo resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_hostextinfo attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

statusmap_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_hostextinfo attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

vrml_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostextinfo attributes)

Providers

naginator

nagios_hostgroup

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_hostgroup { 'resource title':
  hostgroup_name    => # (namevar) The name of this nagios_hostgroup...
  ensure            => # The basic property that the resource should be...
  action_url        => # Nagios configuration file...
  alias             => # Nagios configuration file...
  group             => # The desired group of the config file for this...
  hostgroup_members => # Nagios configuration file...
  members           => # Nagios configuration file...
  mode              => # The desired mode of the config file for this...
  notes             => # Nagios configuration file...
  notes_url         => # Nagios configuration file...
  owner             => # The desired owner of the config file for this...
  provider          => # The specific backend to use for this...
  realm             => # Nagios configuration file...
  register          => # Nagios configuration file...
  target            => # The...
  use               => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

hostgroup_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_hostgroup resource.

(↑ Back to nagios_hostgroup attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_hostgroup attributes)

action_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

alias

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

group

The desired group of the config file for this nagios_hostgroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostgroup attributes)

hostgroup_members

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

members

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

mode

The desired mode of the config file for this nagios_hostgroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostgroup attributes)

notes

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

notes_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

owner

The desired owner of the config file for this nagios_hostgroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_hostgroup attributes)

provider

The specific backend to use for this nagios_hostgroup resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_hostgroup attributes)

realm

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_hostgroup attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_hostgroup attributes)

Providers

naginator

nagios_service

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_service { 'resource title':
  _naginator_name              => # (namevar) The name of this nagios_service...
  ensure                       => # The basic property that the resource should be...
  action_url                   => # Nagios configuration file...
  active_checks_enabled        => # Nagios configuration file...
  business_impact              => # Nagios configuration file...
  check_command                => # Nagios configuration file...
  check_freshness              => # Nagios configuration file...
  check_interval               => # Nagios configuration file...
  check_period                 => # Nagios configuration file...
  contact_groups               => # Nagios configuration file...
  contacts                     => # Nagios configuration file...
  display_name                 => # Nagios configuration file...
  event_handler                => # Nagios configuration file...
  event_handler_enabled        => # Nagios configuration file...
  failure_prediction_enabled   => # Nagios configuration file...
  first_notification_delay     => # Nagios configuration file...
  flap_detection_enabled       => # Nagios configuration file...
  flap_detection_options       => # Nagios configuration file...
  freshness_threshold          => # Nagios configuration file...
  group                        => # The desired group of the config file for this...
  high_flap_threshold          => # Nagios configuration file...
  host_name                    => # Nagios configuration file...
  hostgroup_name               => # Nagios configuration file...
  icon_image                   => # Nagios configuration file...
  icon_image_alt               => # Nagios configuration file...
  initial_state                => # Nagios configuration file...
  is_volatile                  => # Nagios configuration file...
  low_flap_threshold           => # Nagios configuration file...
  max_check_attempts           => # Nagios configuration file...
  mode                         => # The desired mode of the config file for this...
  normal_check_interval        => # Nagios configuration file...
  notes                        => # Nagios configuration file...
  notes_url                    => # Nagios configuration file...
  notification_interval        => # Nagios configuration file...
  notification_options         => # Nagios configuration file...
  notification_period          => # Nagios configuration file...
  notifications_enabled        => # Nagios configuration file...
  obsess_over_service          => # Nagios configuration file...
  owner                        => # The desired owner of the config file for this...
  parallelize_check            => # Nagios configuration file...
  passive_checks_enabled       => # Nagios configuration file...
  poller_tag                   => # Nagios configuration file...
  process_perf_data            => # Nagios configuration file...
  provider                     => # The specific backend to use for this...
  register                     => # Nagios configuration file...
  retain_nonstatus_information => # Nagios configuration file...
  retain_status_information    => # Nagios configuration file...
  retry_check_interval         => # Nagios configuration file...
  retry_interval               => # Nagios configuration file...
  service_description          => # Nagios configuration file...
  servicegroups                => # Nagios configuration file...
  stalking_options             => # Nagios configuration file...
  target                       => # The...
  use                          => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

_naginator_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_service resource.

(↑ Back to nagios_service attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_service attributes)

action_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

active_checks_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

business_impact

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

check_command

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

check_freshness

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

check_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

check_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

contact_groups

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

contacts

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

display_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

event_handler

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

event_handler_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

failure_prediction_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

first_notification_delay

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

flap_detection_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

flap_detection_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

freshness_threshold

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

group

The desired group of the config file for this nagios_service resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_service attributes)

high_flap_threshold

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

hostgroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

icon_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

icon_image_alt

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

initial_state

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

is_volatile

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

low_flap_threshold

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

max_check_attempts

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

mode

The desired mode of the config file for this nagios_service resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_service attributes)

normal_check_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

notes

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

notes_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

notification_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

notification_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

notification_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

notifications_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

obsess_over_service

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

owner

The desired owner of the config file for this nagios_service resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_service attributes)

parallelize_check

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

passive_checks_enabled

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

poller_tag

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

process_perf_data

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

provider

The specific backend to use for this nagios_service resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_service attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

retain_nonstatus_information

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

retain_status_information

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

retry_check_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

retry_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

service_description

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

servicegroups

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

stalking_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_service attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_service attributes)

Providers

naginator

nagios_servicedependency

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_servicedependency { 'resource title':
  _naginator_name               => # (namevar) The name of this nagios_servicedependency...
  ensure                        => # The basic property that the resource should be...
  dependency_period             => # Nagios configuration file...
  dependent_host_name           => # Nagios configuration file...
  dependent_hostgroup_name      => # Nagios configuration file...
  dependent_service_description => # Nagios configuration file...
  execution_failure_criteria    => # Nagios configuration file...
  group                         => # The desired group of the config file for this...
  host_name                     => # Nagios configuration file...
  hostgroup_name                => # Nagios configuration file...
  inherits_parent               => # Nagios configuration file...
  mode                          => # The desired mode of the config file for this...
  notification_failure_criteria => # Nagios configuration file...
  owner                         => # The desired owner of the config file for this...
  provider                      => # The specific backend to use for this...
  register                      => # Nagios configuration file...
  service_description           => # Nagios configuration file...
  target                        => # The...
  use                           => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

_naginator_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_servicedependency resource.

(↑ Back to nagios_servicedependency attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_servicedependency attributes)

dependency_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

dependent_host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

dependent_hostgroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

dependent_service_description

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

execution_failure_criteria

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

group

The desired group of the config file for this nagios_servicedependency resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_servicedependency attributes)

host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

hostgroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

inherits_parent

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

mode

The desired mode of the config file for this nagios_servicedependency resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_servicedependency attributes)

notification_failure_criteria

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

owner

The desired owner of the config file for this nagios_servicedependency resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_servicedependency attributes)

provider

The specific backend to use for this nagios_servicedependency resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_servicedependency attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

service_description

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_servicedependency attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicedependency attributes)

Providers

naginator

nagios_serviceescalation

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_serviceescalation { 'resource title':
  _naginator_name       => # (namevar) The name of this nagios_serviceescalation...
  ensure                => # The basic property that the resource should be...
  contact_groups        => # Nagios configuration file...
  contacts              => # Nagios configuration file...
  escalation_options    => # Nagios configuration file...
  escalation_period     => # Nagios configuration file...
  first_notification    => # Nagios configuration file...
  group                 => # The desired group of the config file for this...
  host_name             => # Nagios configuration file...
  hostgroup_name        => # Nagios configuration file...
  last_notification     => # Nagios configuration file...
  mode                  => # The desired mode of the config file for this...
  notification_interval => # Nagios configuration file...
  owner                 => # The desired owner of the config file for this...
  provider              => # The specific backend to use for this...
  register              => # Nagios configuration file...
  service_description   => # Nagios configuration file...
  servicegroup_name     => # Nagios configuration file...
  target                => # The...
  use                   => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

_naginator_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_serviceescalation resource.

(↑ Back to nagios_serviceescalation attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_serviceescalation attributes)

contact_groups

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

contacts

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

escalation_options

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

escalation_period

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

first_notification

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

group

The desired group of the config file for this nagios_serviceescalation resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_serviceescalation attributes)

host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

hostgroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

last_notification

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

mode

The desired mode of the config file for this nagios_serviceescalation resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_serviceescalation attributes)

notification_interval

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

owner

The desired owner of the config file for this nagios_serviceescalation resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_serviceescalation attributes)

provider

The specific backend to use for this nagios_serviceescalation resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_serviceescalation attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

service_description

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

servicegroup_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_serviceescalation attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceescalation attributes)

Providers

naginator

nagios_serviceextinfo

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_serviceextinfo { 'resource title':
  _naginator_name     => # (namevar) The name of this nagios_serviceextinfo...
  ensure              => # The basic property that the resource should be...
  action_url          => # Nagios configuration file...
  group               => # The desired group of the config file for this...
  host_name           => # Nagios configuration file...
  icon_image          => # Nagios configuration file...
  icon_image_alt      => # Nagios configuration file...
  mode                => # The desired mode of the config file for this...
  notes               => # Nagios configuration file...
  notes_url           => # Nagios configuration file...
  owner               => # The desired owner of the config file for this...
  provider            => # The specific backend to use for this...
  register            => # Nagios configuration file...
  service_description => # Nagios configuration file...
  target              => # The...
  use                 => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

_naginator_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_serviceextinfo resource.

(↑ Back to nagios_serviceextinfo attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_serviceextinfo attributes)

action_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

group

The desired group of the config file for this nagios_serviceextinfo resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_serviceextinfo attributes)

host_name

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

icon_image

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

icon_image_alt

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

mode

The desired mode of the config file for this nagios_serviceextinfo resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_serviceextinfo attributes)

notes

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

notes_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

owner

The desired owner of the config file for this nagios_serviceextinfo resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_serviceextinfo attributes)

provider

The specific backend to use for this nagios_serviceextinfo resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_serviceextinfo attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

service_description

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_serviceextinfo attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_serviceextinfo attributes)

Providers

naginator

nagios_servicegroup

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_servicegroup { 'resource title':
  servicegroup_name    => # (namevar) The name of this nagios_servicegroup...
  ensure               => # The basic property that the resource should be...
  action_url           => # Nagios configuration file...
  alias                => # Nagios configuration file...
  group                => # The desired group of the config file for this...
  members              => # Nagios configuration file...
  mode                 => # The desired mode of the config file for this...
  notes                => # Nagios configuration file...
  notes_url            => # Nagios configuration file...
  owner                => # The desired owner of the config file for this...
  provider             => # The specific backend to use for this...
  register             => # Nagios configuration file...
  servicegroup_members => # Nagios configuration file...
  target               => # The...
  use                  => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

servicegroup_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_servicegroup resource.

(↑ Back to nagios_servicegroup attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_servicegroup attributes)

action_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

alias

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

group

The desired group of the config file for this nagios_servicegroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_servicegroup attributes)

members

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

mode

The desired mode of the config file for this nagios_servicegroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_servicegroup attributes)

notes

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

notes_url

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

owner

The desired owner of the config file for this nagios_servicegroup resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_servicegroup attributes)

provider

The specific backend to use for this nagios_servicegroup resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_servicegroup attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

servicegroup_members

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_servicegroup attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_servicegroup attributes)

Providers

naginator

nagios_timeperiod

Description

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.

You can purge Nagios resources using the resources type, but only in the default file locations. This is an architectural limitation.

Attributes

nagios_timeperiod { 'resource title':
  timeperiod_name => # (namevar) The name of this nagios_timeperiod...
  ensure          => # The basic property that the resource should be...
  alias           => # Nagios configuration file...
  exclude         => # Nagios configuration file...
  friday          => # Nagios configuration file...
  group           => # The desired group of the config file for this...
  mode            => # The desired mode of the config file for this...
  monday          => # Nagios configuration file...
  owner           => # The desired owner of the config file for this...
  provider        => # The specific backend to use for this...
  register        => # Nagios configuration file...
  saturday        => # Nagios configuration file...
  sunday          => # Nagios configuration file...
  target          => # The...
  thursday        => # Nagios configuration file...
  tuesday         => # Nagios configuration file...
  use             => # Nagios configuration file...
  wednesday       => # Nagios configuration file...
  # ...plus any applicable metaparameters.
}

timeperiod_name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of this nagios_timeperiod resource.

(↑ Back to nagios_timeperiod attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to nagios_timeperiod attributes)

alias

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

exclude

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

friday

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

group

The desired group of the config file for this nagios_timeperiod resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_timeperiod attributes)

mode

The desired mode of the config file for this nagios_timeperiod resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_timeperiod attributes)

monday

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

owner

The desired owner of the config file for this nagios_timeperiod resource.

NOTE: If the target file is explicitly managed by a file resource in your manifest, this parameter has no effect. If a parent directory of the target is managed by a recursive file resource, this limitation does not apply (i.e., this parameter takes precedence, and if purge is used, the target file is exempt).

(↑ Back to nagios_timeperiod attributes)

provider

The specific backend to use for this nagios_timeperiod resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to nagios_timeperiod attributes)

register

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

saturday

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

sunday

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

target

(Property: This attribute represents concrete state on the target system.)

The target.

(↑ Back to nagios_timeperiod attributes)

thursday

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

tuesday

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

use

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

wednesday

(Property: This attribute represents concrete state on the target system.)

Nagios configuration file parameter.

(↑ Back to nagios_timeperiod attributes)

Providers

naginator

notify

Description

Sends an arbitrary message, specified as a string, to the agent run-time log. It’s important to note that the notify resource type is not idempotent. As a result, notifications are shown as a change on every Puppet run.

Attributes

notify { 'resource title':
  name     => # (namevar) An arbitrary tag for your own reference; the...
  message  => # The message to be sent to the...
  withpath => # Whether to show the full object path. Defaults...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

An arbitrary tag for your own reference; the name of the message.

(↑ Back to notify attributes)

message

(Property: This attribute represents concrete state on the target system.)

The message to be sent to the log.

(↑ Back to notify attributes)

withpath

Whether to show the full object path. Defaults to false.

Valid values are true, false.

(↑ Back to notify attributes)

package

Description

Manage packages. There is a basic dichotomy in package support right now: Some package types (such as yum and apt) can retrieve their own package files, while others (such as 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.

You can declare multiple package resources with the same name, as long as they specify different providers and have unique titles.

Note that you must use the title to make a reference to a package resource; Package[<NAME>] is not a synonym for Package[<TITLE>] like it is for many other resource types.

Autorequires: If Puppet is managing the files specified as a package’s adminfile, responsefile, or source, the package resource will autorequire those files.

Attributes

package { 'resource title':
  name                 => # (namevar) The package name.  This is the name that the...
  provider             => # (namevar) The specific backend to use for this `package...
  ensure               => # What state the package should be in. On...
  adminfile            => # A file containing package defaults for...
  allow_virtual        => # Specifies if virtual package names are allowed...
  allowcdrom           => # Tells apt to allow cdrom sources in the...
  category             => # A read-only parameter set by the...
  configfiles          => # Whether to keep or replace modified config files 
  description          => # A read-only parameter set by the...
  flavor               => # OpenBSD supports 'flavors', which are further...
  install_options      => # An array of additional options to pass when...
  instance             => # A read-only parameter set by the...
  package_settings     => # Settings that can change the contents or...
  platform             => # A read-only parameter set by the...
  reinstall_on_refresh => # Whether this resource should respond to refresh...
  responsefile         => # A file containing any necessary answers to...
  root                 => # A read-only parameter set by the...
  source               => # Where to find the package file. This is only...
  status               => # A read-only parameter set by the...
  uninstall_options    => # An array of additional options to pass when...
  vendor               => # A read-only parameter set by the...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The package name. This is the name that the packaging system uses internally, which is sometimes (especially on Solaris) a name that is basically useless to humans. If a package goes by several names, you can use a single title and then set the name conditionally:

# In the 'openssl' class
$ssl = $operatingsystem ? {
  solaris => SMCossl,
  default => openssl
}

package { 'openssl':
  ensure => installed,
  name   => $ssl,
}

...

$ssh = $operatingsystem ? {
  solaris => SMCossh,
  default => openssh
}

package { 'openssh':
  ensure  => installed,
  name    => $ssh,
  require => Package['openssl'],
}

(↑ Back to package attributes)

provider

(Secondary namevar: This resource type allows you to manage multiple resources with the same name as long as their providers are different.)

The specific backend to use for this package resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to package attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

What state the package should be in. On packaging systems that can retrieve new packages on their own, you can choose which package to retrieve by specifying a version number or latest as the ensure value. On packaging systems that manage configuration files separately from “normal” system files, you can uninstall config files by specifying purged as the ensure value. This defaults to installed.

Version numbers must match the full version to install, including release if the provider uses a release moniker. Ranges or semver patterns are not accepted except for the gem package provider. For example, to install the bash package from the rpm bash-4.1.2-29.el6.x86_64.rpm, use the string '4.1.2-29.el6'.

Valid values are present (also called installed), absent, purged, held, latest. Values can match /./.

(↑ Back to package attributes)

adminfile

A file containing package defaults for installing packages.

This attribute is only used on Solaris. Its value should be a path to a local file stored on the target system. Solaris’s package tools expect either an absolute file path or a relative path to a file in /var/sadm/install/admin.

The value of adminfile will be passed directly to the pkgadd or pkgrm command with the -a <ADMINFILE> option.

(↑ Back to package attributes)

allow_virtual

Specifies if virtual package names are allowed for install and uninstall.

Valid values are true, false, yes, no.

Requires features virtual_packages.

(↑ Back to package attributes)

allowcdrom

Tells apt to allow cdrom sources in the sources.list file. Normally apt will bail if you try this.

Valid values are true, false.

(↑ Back to package attributes)

category

A read-only parameter set by the package.

(↑ Back to package attributes)

configfiles

Whether to keep or replace modified config files when installing or upgrading a package. This only affects the apt and dpkg providers. Defaults to keep.

Valid values are keep, replace.

(↑ Back to package attributes)

description

A read-only parameter set by the package.

(↑ Back to package attributes)

flavor

OpenBSD supports ‘flavors’, which are further specifications for which type of package you want.

(↑ Back to package attributes)

install_options

An array of additional options to pass when installing a package. These options are package-specific, and should be documented by the software vendor. One commonly implemented option is INSTALLDIR:

package { 'mysql':
  ensure          => installed,
  source          => 'N:/packages/mysql-5.5.16-winx64.msi',
  install_options => [ '/S', { 'INSTALLDIR' => 'C:\mysql-5.5' } ],
}

Each option in the array can either be a string or a hash, where each key and value pair are interpreted in a provider specific way. Each option will automatically be quoted when passed to the install command.

With Windows packages, note that file paths in an install option must use backslashes. (Since install options are passed directly to the installation command, forward slashes won’t be automatically converted like they are in file resources.) Note also that backslashes in double-quoted strings must be escaped and backslashes in single-quoted strings can be escaped.

Requires features install_options.

(↑ Back to package attributes)

instance

A read-only parameter set by the package.

(↑ Back to package attributes)

package_settings

(Property: This attribute represents concrete state on the target system.)

Settings that can change the contents or configuration of a package.

The formatting and effects of package_settings are provider-specific; any provider that implements them must explain how to use them in its documentation. (Our general expectation is that if a package is installed but its settings are out of sync, the provider should re-install that package with the desired settings.)

An example of how package_settings could be used is FreeBSD’s port build options — a future version of the provider could accept a hash of options, and would reinstall the port if the installed version lacked the correct settings.

package { 'www/apache22':
  package_settings => { 'SUEXEC' => false }
}

Again, check the documentation of your platform’s package provider to see the actual usage.

Requires features package_settings.

(↑ Back to package attributes)

platform

A read-only parameter set by the package.

(↑ Back to package attributes)

reinstall_on_refresh

Whether this resource should respond to refresh events (via subscribe, notify, or the ~> arrow) by reinstalling the package. Only works for providers that support the reinstallable feature.

This is useful for source-based distributions, where you may want to recompile a package if the build options change.

If you use this, be careful of notifying classes when you want to restart services. If the class also contains a refreshable package, doing so could cause unnecessary re-installs.

Defaults to false.

Valid values are true, false.

(↑ Back to package attributes)

responsefile

A file containing any necessary answers to questions asked by the package. This is currently used on Solaris and Debian. The value will be validated according to system rules, but it should generally be a fully qualified path.

(↑ Back to package attributes)

root

A read-only parameter set by the package.

(↑ Back to package attributes)

source

Where to find the package file. This is only used by providers that don’t automatically download packages from a central repository. (For example: the yum and apt providers ignore this attribute, but the rpm and dpkg providers require it.)

Different providers accept different values for source. Most providers accept paths to local files stored on the target system. Some providers may also accept URLs or network drive paths. Puppet will not automatically retrieve source files for you, and usually just passes the value of source to the package installation command.

You can use a file resource if you need to manually copy package files to the target system.

(↑ Back to package attributes)

status

A read-only parameter set by the package.

(↑ Back to package attributes)

uninstall_options

An array of additional options to pass when uninstalling a package. These options are package-specific, and should be documented by the software vendor. For example:

package { 'VMware Tools':
  ensure            => absent,
  uninstall_options => [ { 'REMOVE' => 'Sync,VSS' } ],
}

Each option in the array can either be a string or a hash, where each key and value pair are interpreted in a provider specific way. Each option will automatically be quoted when passed to the uninstall command.

On Windows, this is the only place in Puppet where backslash separators should be used. Note that backslashes in double-quoted strings must be double-escaped and backslashes in single-quoted strings may be double-escaped.

Requires features uninstall_options.

(↑ Back to package attributes)

vendor

A read-only parameter set by the package.

(↑ Back to package attributes)

Providers

aix

Installation from an AIX software directory, using the AIX installp command. The source parameter is required for this provider, and should be set to the absolute path (on the puppet agent machine) of a directory containing one or more BFF package files.

The installp command will generate a table of contents file (named .toc) in this directory, and the name parameter (or resource title) that you specify for your package resource must match a package name that exists in the .toc file.

Note that package downgrades are not supported; if your resource specifies a specific version number and there is already a newer version of the package installed on the machine, the resource will fail with an error message.

  • Required binaries: /usr/bin/lslpp, /usr/sbin/installp.
  • Default for operatingsystem == aix.
  • Supported features: installable, uninstallable, upgradeable, versionable.

appdmg

Package management which copies application bundles to a target.

  • Required binaries: /usr/bin/curl, /usr/bin/ditto, /usr/bin/hdiutil.
  • Supported features: installable.

apple

Package management based on OS X’s built-in packaging system. This is essentially the simplest and least functional package system in existence – it only supports installation; no deletion or upgrades. The provider will automatically add the .pkg extension, so leave that off when specifying the package name.

  • Required binaries: /usr/sbin/installer.
  • Supported features: installable.

apt

Package management via apt-get.

This provider supports the install_options attribute, which allows command-line flags to be passed to apt-get. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: /usr/bin/apt-cache, /usr/bin/apt-get, /usr/bin/debconf-set-selections.
  • Default for osfamily == debian.
  • Supported features: holdable, install_options, installable, purgeable, uninstallable, upgradeable, versionable.

aptitude

Package management via aptitude.

  • Required binaries: /usr/bin/apt-cache, /usr/bin/aptitude.
  • Supported features: holdable, installable, purgeable, uninstallable, upgradeable, versionable.

aptrpm

Package management via apt-get ported to rpm.

  • Required binaries: apt-cache, apt-get, rpm.
  • Supported features: installable, purgeable, uninstallable, upgradeable, versionable.

blastwave

Package management using Blastwave.org’s pkg-get command on Solaris.

  • Required binaries: pkg-get.
  • Supported features: installable, uninstallable, upgradeable.

dnf

Support via dnf.

Using this provider’s uninstallable feature will not remove dependent packages. To remove dependent packages with this provider use the purgeable feature, but note this feature is destructive and should be used with the utmost care.

This provider supports the install_options attribute, which allows command-line flags to be passed to dnf. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: dnf, rpm.
  • Default for operatingsystem == fedora and operatingsystemmajrelease == 22, 23, 24, 25, 26, 27, 28, 29, 30.
  • Supported features: install_options, installable, purgeable, uninstallable, upgradeable, versionable, virtual_packages.

dpkg

Package management via dpkg. Because this only uses dpkg and not apt, you must specify the source of any packages you want to manage.

  • Required binaries: /usr/bin/dpkg-deb, /usr/bin/dpkg-query, /usr/bin/dpkg.
  • Supported features: holdable, installable, purgeable, uninstallable, upgradeable.

fink

Package management via fink.

  • Required binaries: /sw/bin/apt-cache, /sw/bin/apt-get, /sw/bin/dpkg-query, /sw/bin/fink.
  • Supported features: holdable, installable, purgeable, uninstallable, upgradeable, versionable.

freebsd

The specific form of package management on FreeBSD. This is an extremely quirky packaging system, in that it freely mixes between ports and packages. Apparently all of the tools are written in Ruby, so there are plans to rewrite this support to directly use those libraries.

  • Required binaries: /usr/sbin/pkg_add, /usr/sbin/pkg_delete, /usr/sbin/pkg_info.
  • Supported features: installable, purgeable, uninstallable, upgradeable.

gem

Ruby Gem support. If a URL is passed via source, then that URL is appended to the list of remote gem repositories; to ensure that only the specified source is used, also pass --clear-sources via install_options. If source is present but is not a valid URL, it will be interpreted as the path to a local gem file. If source is not present, the gem will be installed from the default gem repositories. Note that to modify this for Windows, it has to be a valid URL.

This provider supports the install_options and uninstall_options attributes, which allow command-line flags to be passed to the gem command. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: gem.
  • Supported features: install_options, installable, uninstall_options, uninstallable, upgradeable, versionable.

hpux

HP-UX’s packaging system.

  • Required binaries: /usr/sbin/swinstall, /usr/sbin/swlist, /usr/sbin/swremove.
  • Default for operatingsystem == hp-ux.
  • Supported features: installable, uninstallable.

macports

Package management using MacPorts on OS X.

Supports MacPorts versions and revisions, but not variants. Variant preferences may be specified using the MacPorts variants.conf file.

When specifying a version in the Puppet DSL, only specify the version, not the revision. Revisions are only used internally for ensuring the latest version/revision of a port.

  • Required binaries: /opt/local/bin/port.
  • Supported features: installable, uninstallable, upgradeable, versionable.

nim

Installation from an AIX NIM LPP source. The source parameter is required for this provider, and should specify the name of a NIM lpp_source resource that is visible to the puppet agent machine. This provider supports the management of both BFF/installp and RPM packages.

Note that package downgrades are not supported; if your resource specifies a specific version number and there is already a newer version of the package installed on the machine, the resource will fail with an error message.

  • Required binaries: /usr/bin/lslpp, /usr/sbin/nimclient, rpm.
  • Supported features: installable, uninstallable, upgradeable, versionable.

openbsd

OpenBSD’s form of pkg_add support.

This provider supports the install_options and uninstall_options attributes, which allow command-line flags to be passed to pkg_add and pkg_delete. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: pkg_add, pkg_delete, pkg_info.
  • Default for operatingsystem == openbsd.
  • Supported features: install_options, installable, purgeable, uninstall_options, uninstallable, upgradeable, versionable.

opkg

Opkg packaging support. Common on OpenWrt and OpenEmbedded platforms

  • Required binaries: opkg.
  • Default for operatingsystem == openwrt.
  • Supported features: installable, uninstallable, upgradeable.

pacman

Support for the Package Manager Utility (pacman) used in Archlinux.

This provider supports the install_options attribute, which allows command-line flags to be passed to pacman. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: /usr/bin/pacman.
  • Default for operatingsystem == archlinux, manjarolinux.
  • Supported features: install_options, installable, uninstall_options, uninstallable, upgradeable, virtual_packages.

pip

Python packages via pip.

This provider supports the install_options attribute, which allows command-line flags to be passed to pip. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Supported features: install_options, installable, uninstallable, upgradeable, versionable.

pip3

Python packages via pip3.

This provider supports the install_options attribute, which allows command-line flags to be passed to pip3. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Supported features: install_options, installable, uninstallable, upgradeable, versionable.

pkg

OpenSolaris image packaging system. See pkg(5) for more information.

  • Required binaries: /usr/bin/pkg.
  • Default for kernelrelease == 5.11, 5.12 and osfamily == solaris.
  • Supported features: holdable, installable, uninstallable, upgradeable, versionable.

pkgdmg

Package management based on Apple’s Installer.app and DiskUtility.app.

This provider works by checking the contents of a DMG image for Apple pkg or mpkg files. Any number of pkg or mpkg files may exist in the root directory of the DMG file system, and Puppet will install all of them. Subdirectories are not checked for packages.

This provider can also accept plain .pkg (but not .mpkg) files in addition to .dmg files.

Notes:

  • The source attribute is mandatory. It must be either a local disk path or an HTTP, HTTPS, or FTP URL to the package.
  • The name of the resource must be the filename (without path) of the DMG file.
  • When installing the packages from a DMG, this provider writes a file to disk at /var/db/.puppet_pkgdmg_installed_NAME. If that file is present, Puppet assumes all packages from that DMG are already installed.
  • This provider is not versionable and uses DMG filenames to determine whether a package has been installed. Thus, to install new a version of a package, you must create a new DMG with a different filename.

  • Required binaries: /usr/bin/curl, /usr/bin/hdiutil, /usr/sbin/installer.
  • Default for operatingsystem == darwin.
  • Supported features: installable.

pkgin

Package management using pkgin, a binary package manager for pkgsrc.

  • Required binaries: pkgin.
  • Default for operatingsystem == smartos, netbsd.
  • Supported features: installable, uninstallable, upgradeable, versionable.

pkgng

A PkgNG provider for FreeBSD and DragonFly.

  • Required binaries: /usr/local/sbin/pkg.
  • Default for operatingsystem == freebsd, dragonfly.
  • Supported features: installable, uninstallable, upgradeable, versionable.

pkgutil

Package management using Peter Bonivart’s pkgutil command on Solaris.

  • Required binaries: pkgutil.
  • Supported features: installable, uninstallable, upgradeable.

portage

Provides packaging support for Gentoo’s portage system.

This provider supports the install_options and uninstall_options attributes, which allows command-line flags to be passed to emerge. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: /usr/bin/eix-update, /usr/bin/eix, /usr/bin/emerge, /usr/bin/qatom.
  • Default for operatingsystem == gentoo.
  • Supported features: install_options, installable, purgeable, reinstallable, uninstall_options, uninstallable, upgradeable, versionable, virtual_packages.

ports

Support for FreeBSD’s ports. Note that this, too, mixes packages and ports.

  • Required binaries: /usr/local/sbin/pkg_deinstall, /usr/local/sbin/portupgrade, /usr/local/sbin/portversion, /usr/sbin/pkg_info.
  • Supported features: installable, purgeable, uninstallable, upgradeable.

portupgrade

Support for FreeBSD’s ports using the portupgrade ports management software. Use the port’s full origin as the resource name. eg (ports-mgmt/portupgrade) for the portupgrade port.

  • Required binaries: /usr/local/sbin/pkg_deinstall, /usr/local/sbin/portinstall, /usr/local/sbin/portupgrade, /usr/local/sbin/portversion, /usr/sbin/pkg_info.
  • Supported features: installable, uninstallable, upgradeable.

puppet_gem

Puppet Ruby Gem support. This provider is useful for managing gems needed by the ruby provided in the puppet-agent package.

  • Required binaries: /opt/puppetlabs/puppet/bin/gem.
  • Supported features: install_options, installable, uninstall_options, uninstallable, upgradeable, versionable.

rpm

RPM packaging support; should work anywhere with a working rpm binary.

This provider supports the install_options and uninstall_options attributes, which allow command-line flags to be passed to rpm. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: rpm.
  • Supported features: install_options, installable, uninstall_options, uninstallable, upgradeable, versionable, virtual_packages.

rug

Support for suse rug package manager.

  • Required binaries: /usr/bin/rug, rpm.
  • Supported features: installable, uninstallable, upgradeable, versionable.

sun

Sun’s packaging system. Requires that you specify the source for the packages you’re managing.

This provider supports the install_options attribute, which allows command-line flags to be passed to pkgadd. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: /usr/bin/pkginfo, /usr/sbin/pkgadd, /usr/sbin/pkgrm.
  • Default for osfamily == solaris.
  • Supported features: install_options, installable, uninstallable, upgradeable.

sunfreeware

Package management using sunfreeware.com’s pkg-get command on Solaris. At this point, support is exactly the same as blastwave support and has not actually been tested.

  • Required binaries: pkg-get.
  • Supported features: installable, uninstallable, upgradeable.

tdnf

Support via tdnf.

This provider supports the install_options attribute, which allows command-line flags to be passed to tdnf. These options should be spcified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: rpm, tdnf.
  • Default for operatingsystem == PhotonOS.
  • Supported features: install_options, installable, purgeable, uninstallable, upgradeable, versionable, virtual_packages.

up2date

Support for Red Hat’s proprietary up2date package update mechanism.

  • Required binaries: /usr/sbin/up2date-nox.
  • Default for lsbdistrelease == 2.1, 3, 4 and osfamily == redhat.
  • Supported features: installable, uninstallable, upgradeable.

urpmi

Support via urpmi.

  • Required binaries: rpm, urpme, urpmi, urpmq.
  • Default for operatingsystem == mandriva, mandrake.
  • Supported features: installable, purgeable, uninstallable, upgradeable, versionable.

windows

Windows package management.

This provider supports either MSI or self-extracting executable installers.

This provider requires a source attribute when installing the package. It accepts paths to local files, mapped drives, or UNC paths.

This provider supports the install_options and uninstall_options attributes, which allow command-line flags to be passed to the installer. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

If the executable requires special arguments to perform a silent install or uninstall, then the appropriate arguments should be specified using the install_options or uninstall_options attributes, respectively. Puppet will automatically quote any option that contains spaces.

  • Default for operatingsystem == windows.
  • Supported features: install_options, installable, uninstall_options, uninstallable, versionable.

yum

Support via yum.

Using this provider’s uninstallable feature will not remove dependent packages. To remove dependent packages with this provider use the purgeable feature, but note this feature is destructive and should be used with the utmost care.

This provider supports the install_options attribute, which allows command-line flags to be passed to yum. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: rpm, yum.
  • Default for osfamily == redhat.
  • Supported features: install_options, installable, purgeable, uninstallable, upgradeable, versionable, virtual_packages.

zypper

Support for SuSE zypper package manager. Found in SLES10sp2+ and SLES11.

This provider supports the install_options attribute, which allows command-line flags to be passed to zypper. These options should be specified as a string (e.g. ‘–flag’), a hash (e.g. {‘–flag’ => ‘value’}), or an array where each element is either a string or a hash.

  • Required binaries: /usr/bin/zypper.
  • Default for operatingsystem == suse, sles, sled, opensuse.
  • Supported features: install_options, installable, uninstallable, upgradeable, versionable, virtual_packages.

Provider Features

Available features:

  • holdable — The provider is capable of placing packages on hold such that they are not automatically upgraded as a result of other package dependencies unless explicit action is taken by a user or another package. Held is considered a superset of installed.
  • install_options — The provider accepts options to be passed to the installer command.
  • installable — The provider can install packages.
  • package_settings — The provider accepts package_settings to be ensured for the given package. The meaning and format of these settings is provider-specific.
  • 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.
  • reinstallable — The provider can reinstall packages.
  • uninstall_options — The provider accepts options to be passed to the uninstaller command.
  • 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.
  • virtual_packages — The provider accepts virtual package names for install and uninstall.

Provider support:

Provider holdable install options installable package settings purgeable reinstallable uninstall options uninstallable upgradeable versionable virtual packages
aix X X X X
appdmg X
apple X
apt X X X X X X X
aptitude X X X X X X
aptrpm X X X X X
blastwave X X X
dnf X X X X X X X
dpkg X X X X X
fink X X X X X X
freebsd X X X X
gem X X X X X X
hpux X X
macports X X X X
nim X X X X
openbsd X X X X X X X
opkg X X X
pacman X X X X X X
pip X X X X X
pip3 X X X X X
pkg X X X X X
pkgdmg X
pkgin X X X X
pkgng X X X X
pkgutil X X X
portage X X X X X X X X X
ports X X X X
portupgrade X X X
puppet_gem X X X X X X
rpm X X X X X X X
rug X X X X
sun X X X X
sunfreeware X X X
tdnf X X X X X X X
up2date X X X
urpmi X X X X X
windows X X X X X
yum X X X X X X X
zypper X X X X X X

resources

Description

This is a metatype that can manage other resource types. Any metaparams specified here will be passed on to any generated resources, so you can purge unmanaged resources but set noop to true so the purging is only logged and does not actually happen.

Attributes

resources { 'resource title':
  name               => # (namevar) The name of the type to be...
  purge              => # Whether to purge unmanaged resources.  When set...
  unless_system_user => # This keeps system users from being purged.  By...
  unless_uid         => # This keeps specific uids or ranges of uids from...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the type to be managed.

(↑ Back to resources attributes)

purge

Whether to purge unmanaged resources. When set to true, this will delete any resource that is not specified in your configuration and is not autorequired by any managed resources. Note: The ssh_authorized_key resource type can’t be purged this way; instead, see the purge_ssh_keys attribute of the user type.

Valid values are true, false, yes, no.

(↑ Back to resources attributes)

unless_system_user

This keeps system users from being purged. By default, it does not purge users whose UIDs are less than the minimum UID for the system (typically 500 or 1000), but you can specify a different UID as the inclusive limit.

Valid values are true, false. Values can match /^\d+$/.

(↑ Back to resources attributes)

unless_uid

This keeps specific uids or ranges of uids from being purged when purge is true. Accepts integers, integer strings, and arrays of integers or integer strings. To specify a range of uids, consider using the range() function from stdlib.

(↑ Back to resources attributes)

router

Description

Manages connected router.

Attributes

router { 'resource title':
  url => # (namevar) An SSH or telnet URL at which to access the...
  # ...plus any applicable metaparameters.
}

url

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

An SSH or telnet URL at which to access the router, in the form ssh://user:pass:enable@host/ or telnet://user:pass:enable@host/.

(↑ Back to router attributes)

schedule

Description

Define schedules for Puppet. Resources can be limited to a schedule by using the schedule metaparameter.

Currently, schedules can only be used to stop a resource from being applied; they cannot cause a resource to be applied when it otherwise wouldn’t be, and they cannot accurately specify a time when a resource should run.

Every time Puppet applies its configuration, it will apply the set of resources whose schedule does not eliminate them from running right then, but there is currently no system in place to guarantee that a given resource runs at a given time. If you specify a very restrictive schedule and Puppet happens to run at a time within that schedule, then the resources will get applied; otherwise, that work may never get done.

Thus, it is advisable to use wider scheduling (for example, over a couple of hours) combined with periods and repetitions. For instance, if you wanted to restrict certain resources to only running once, between the hours of two and 4 AM, then you would use this schedule:

schedule { 'maint':
  range  => '2 - 4',
  period => daily,
  repeat => 1,
}

With this schedule, the first time that Puppet runs between 2 and 4 AM, all resources with this schedule will get applied, but they won’t get applied again between 2 and 4 because they will have already run once that day, and they won’t get applied outside that schedule because they will be outside the scheduled range.

Puppet automatically creates a schedule for each of the valid periods with the same name as that period (such as hourly and daily). Additionally, a schedule named puppet is created and used as the default, with the following attributes:

schedule { 'puppet':
  period => hourly,
  repeat => 2,
}

This will cause resources to be applied every 30 minutes by default.

Attributes

schedule { 'resource title':
  name        => # (namevar) The name of the schedule.  This name is used...
  period      => # The period of repetition for resources on this...
  periodmatch => # Whether periods should be matched by a numeric...
  range       => # The earliest and latest that a resource can be...
  repeat      => # How often a given resource may be applied in...
  weekday     => # The days of the week in which the schedule...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the schedule. This name is used when assigning the schedule to a resource with the schedule metaparameter:

schedule { 'everyday':
  period => daily,
  range  => '2 - 4',
}

exec { '/usr/bin/apt-get update':
  schedule => 'everyday',
}

(↑ Back to schedule attributes)

period

The period of repetition for resources on this schedule. The default is for resources to get applied every time Puppet runs.

Note that the period defines how often a given resource will get applied but not when; if you would like to restrict the hours that a given resource can be applied (for instance, only at night during a maintenance window), then use the range attribute.

If the provided periods are not sufficient, you can provide a value to the repeat attribute, which will cause Puppet to schedule the affected resources evenly in the period the specified number of times. Take this schedule:

schedule { 'veryoften':
  period => hourly,
  repeat => 6,
}

This can cause Puppet to apply that resource up to every 10 minutes.

At the moment, Puppet cannot guarantee that level of repetition; that is, the resource can applied up to every 10 minutes, but internal factors might prevent it from actually running that often (for instance, if a Puppet run is still in progress when the next run is scheduled to start, that next run will be suppressed).

See the periodmatch attribute for tuning whether to match times by their distance apart or by their specific value.

Allowed values:

  • hourly
  • daily
  • weekly
  • monthly
  • never

Tip: You can use period => never, to prevent a resource from being applied in the given range. This is useful if you need to create a blackout window to perform sensitive operations without interruption.

(↑ Back to schedule attributes)

periodmatch

Whether periods should be matched by a numeric value (for instance, whether two times are in the same hour) or by their chronological distance apart (whether two times are 60 minutes apart).

Valid values are number, distance.

(↑ Back to schedule attributes)

range

The earliest and latest that a resource can be applied. This is always a hyphen-separated range within a 24 hour period, and hours must be specified in numbers between 0 and 23, inclusive. Minutes and seconds can optionally be provided, using the normal colon as a separator. For instance:

schedule { 'maintenance':
  range => '1:30 - 4:30',
}

This is mostly useful for restricting certain resources to being applied in maintenance windows or during off-peak hours. Multiple ranges can be applied in array context. As a convenience when specifying ranges, you can cross midnight (for example, range => "22:00 - 04:00").

(↑ Back to schedule attributes)

repeat

How often a given resource may be applied in this schedule’s period. Defaults to 1; must be an integer.

(↑ Back to schedule attributes)

weekday

The days of the week in which the schedule should be valid. You may specify the full day name ‘Tuesday’, the three character abbreviation ‘Tue’, or a number (as a string or as an integer) corresponding to the day of the week where 0 is Sunday, 1 is Monday, and so on. Multiple days can be specified as an array. If not specified, the day of the week will not be considered in the schedule.

If you are also using a range match that spans across midnight then this parameter will match the day that it was at the start of the range, not necessarily the day that it is when it matches. For example, consider this schedule:

schedule { 'maintenance_window':
  range   => '22:00 - 04:00',
  weekday => 'Saturday',
}

This will match at 11 PM on Saturday and 2 AM on Sunday, but not at 2 AM on Saturday.

(↑ Back to schedule attributes)

scheduled_task

Description

Installs and manages Windows Scheduled Tasks. All attributes except name, command, and trigger are optional; see the description of the trigger attribute for details on setting schedules.

Attributes

scheduled_task { 'resource title':
  name        => # (namevar) The name assigned to the scheduled task.  This...
  ensure      => # The basic property that the resource should be...
  arguments   => # Any arguments or flags that should be passed to...
  command     => # The full path to the application to run, without 
  enabled     => # Whether the triggers for this task should be...
  password    => # The password for the user specified in the...
  provider    => # The specific backend to use for this...
  trigger     => # One or more triggers defining when the task...
  user        => # The user to run the scheduled task as.  Please...
  working_dir => # The full path of the directory in which to start 
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name assigned to the scheduled task. This will uniquely identify the task on the system.

(↑ Back to scheduled_task attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to scheduled_task attributes)

arguments

(Property: This attribute represents concrete state on the target system.)

Any arguments or flags that should be passed to the command. Multiple arguments should be specified as a space-separated string.

(↑ Back to scheduled_task attributes)

command

(Property: This attribute represents concrete state on the target system.)

The full path to the application to run, without any arguments.

(↑ Back to scheduled_task attributes)

enabled

(Property: This attribute represents concrete state on the target system.)

Whether the triggers for this task should be enabled. This attribute affects every trigger for the task; triggers cannot be enabled or disabled individually.

Valid values are true, false.

(↑ Back to scheduled_task attributes)

password

The password for the user specified in the ‘user’ attribute. This is only used if specifying a user other than ‘SYSTEM’. Since there is no way to retrieve the password used to set the account information for a task, this parameter will not be used to determine if a scheduled task is in sync or not.

(↑ Back to scheduled_task attributes)

provider

The specific backend to use for this scheduled_task resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to scheduled_task attributes)

trigger

(Property: This attribute represents concrete state on the target system.)

One or more triggers defining when the task should run. A single trigger is represented as a hash, and multiple triggers can be specified with an array of hashes.

A trigger can contain the following keys:

  • For all triggers:
    • schedule (Required) — What kind of trigger this is. Valid values are daily, weekly, monthly, or once. Each kind of trigger is configured with a different set of keys; see the sections below. (once triggers only need a start time/date.)
    • start_time (Required) — The time of day when the trigger should first become active. Several time formats will work, but we suggest 24-hour time formatted as HH:MM.
    • start_date — The date when the trigger should first become active. Defaults to the current date. You should format dates as YYYY-MM-DD, although other date formats may work. (Under the hood, this uses Date.parse.)
    • minutes_interval — The repeat interval in minutes.
    • minutes_duration — The duration in minutes, needs to be greater than the minutes_interval.
  • For daily triggers:
    • every — How often the task should run, as a number of days. Defaults to 1. (“2” means every other day, “3” means every three days, and so on)
  • For weekly triggers:
    • every — How often the task should run, as a number of weeks. Defaults to 1. (“2” means every other week, “3” means every three weeks, and so on)
    • day_of_week — Which days of the week the task should run, as an array. Defaults to all days. Each day must be one of mon, tues, wed, thurs, fri, sat, sun, or all.
  • For monthly (by date) triggers:
    • months — Which months the task should run, as an array. Defaults to all months. Each month must be an integer between 1 and 12.
    • on (Required) — Which days of the month the task should run, as an array. Each day must be an integer between 1 and 31.
  • For monthly (by weekday) triggers:
    • months — Which months the task should run, as an array. Defaults to all months. Each month must be an integer between 1 and 12.
    • day_of_week (Required) — Which day of the week the task should run, as an array with only one element. Each day must be one of mon, tues, wed, thurs, fri, sat, sun, or all.
    • which_occurrence (Required) — The occurrence of the chosen weekday when the task should run. Must be one of first, second, third, fourth, or fifth.

Examples:

# Run at 8am on the 1st and 15th days of the month in January, March,
# May, July, September, and November, starting after August 31st, 2011.
trigger => {
  schedule   => monthly,
  start_date => '2011-08-31',   # Defaults to current date
  start_time => '08:00',        # Must be specified
  months     => [1,3,5,7,9,11], # Defaults to all
  on         => [1, 15],        # Must be specified
}

# Run at 8am on the first Monday of the month for January, March, and May,
# starting after August 31st, 2011.
trigger => {
  schedule         => monthly,
  start_date       => '2011-08-31', # Defaults to current date
  start_time       => '08:00',      # Must be specified
  months           => [1,3,5],      # Defaults to all
  which_occurrence => first,        # Must be specified
  day_of_week      => [mon],        # Must be specified
}

# Run daily repeating every 30 minutes between 9am and 5pm (480 minutes) starting after August 31st, 2011.
trigger => {
  schedule         => daily,
  start_date       => '2011-08-31', # Defaults to current date
  start_time       => '8:00',       # Must be specified
  minutes_interval => 30,
  minutes_duration => 480,
}

(↑ Back to scheduled_task attributes)

user

(Property: This attribute represents concrete state on the target system.)

The user to run the scheduled task as. Please note that not all security configurations will allow running a scheduled task as ‘SYSTEM’, and saving the scheduled task under these conditions will fail with a reported error of ‘The operation completed successfully’. It is recommended that you either choose another user to run the scheduled task, or alter the security policy to allow v1 scheduled tasks to run as the ‘SYSTEM’ account. Defaults to ‘SYSTEM’.

Please also note that Puppet must be running as a privileged user in order to manage scheduled_task resources. Running as an unprivileged user will result in ‘access denied’ errors.

(↑ Back to scheduled_task attributes)

working_dir

(Property: This attribute represents concrete state on the target system.)

The full path of the directory in which to start the command.

(↑ Back to scheduled_task attributes)

Providers

win32_taskscheduler

This provider manages scheduled tasks on Windows.

  • Default for operatingsystem == windows.

selboolean

Description

Manages SELinux booleans on systems with SELinux support. The supported booleans are any of the ones found in /selinux/booleans/.

Attributes

selboolean { 'resource title':
  name       => # (namevar) The name of the SELinux boolean to be...
  persistent => # If set true, SELinux booleans will be written to 
  provider   => # The specific backend to use for this...
  value      => # Whether the SELinux boolean should be enabled or 
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the SELinux boolean to be managed.

(↑ Back to selboolean attributes)

persistent

If set true, SELinux booleans will be written to disk and persist across reboots. The default is false.

Valid values are true, false.

(↑ Back to selboolean attributes)

provider

The specific backend to use for this selboolean resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to selboolean attributes)

value

(Property: This attribute represents concrete state on the target system.)

Whether the SELinux boolean should be enabled or disabled.

Valid values are on, off.

(↑ Back to selboolean attributes)

Providers

getsetsebool

Manage SELinux booleans using the getsebool and setsebool binaries.

  • Required binaries: /usr/sbin/getsebool, /usr/sbin/setsebool.

selmodule

Description

Manages loading and unloading of SELinux policy modules on the system. Requires SELinux support. See man semodule(8) for more information on SELinux policy modules.

Autorequires: If Puppet is managing the file containing this SELinux policy module (which is either explicitly specified in the selmodulepath attribute or will be found at {selmoduledir}/{name}.pp), the selmodule resource will autorequire that file.

Attributes

selmodule { 'resource title':
  name          => # (namevar) The name of the SELinux policy to be managed....
  ensure        => # The basic property that the resource should be...
  provider      => # The specific backend to use for this `selmodule` 
  selmoduledir  => # The directory to look for the compiled pp module 
  selmodulepath => # The full path to the compiled .pp policy module. 
  syncversion   => # If set to `true`, the policy will be reloaded if 
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the SELinux policy to be managed. You should not include the customary trailing .pp extension.

(↑ Back to selmodule attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to selmodule attributes)

provider

The specific backend to use for this selmodule resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to selmodule attributes)

selmoduledir

The directory to look for the compiled pp module file in. Currently defaults to /usr/share/selinux/targeted. If the selmodulepath attribute is not specified, Puppet will expect to find the module in <selmoduledir>/<name>.pp, where name is the value of the name parameter.

(↑ Back to selmodule attributes)

selmodulepath

The full path to the compiled .pp policy module. You only need to use this if the module file is not in the selmoduledir directory.

(↑ Back to selmodule attributes)

syncversion

(Property: This attribute represents concrete state on the target system.)

If set to true, the policy will be reloaded if the version found in the on-disk file differs from the loaded version. If set to false (the default) the only check that will be made is if the policy is loaded at all or not.

Valid values are true, false.

(↑ Back to selmodule attributes)

Providers

semodule

Manage SELinux policy modules using the semodule binary.

  • Required binaries: /usr/sbin/semodule.

service

Description

Manage running services. Service support unfortunately varies widely by platform — some platforms have very little if any concept of a running service, and some have a very codified and powerful concept. Puppet’s service support is usually capable of doing the right thing, but the more information you can provide, the better behaviour you will get.

Puppet 2.7 and newer expect init scripts to have a working status command. If this isn’t the case for any of your services’ init scripts, you will need to set hasstatus to false and possibly specify a custom status command in the status attribute. As a last resort, Puppet will attempt to search the process table by calling whatever command is listed in the ps fact. The default search pattern is the name of the service, but you can specify it with the pattern attribute.

Refresh: service resources can respond to refresh events (via notify, subscribe, or the ~> arrow). If a service receives an event from another resource, Puppet will restart the service it manages. The actual command used to restart the service depends on the platform and can be configured:

  • If you set hasrestart to true, Puppet will use the init script’s restart command.
  • You can provide an explicit command for restarting with the restart attribute.
  • If you do neither, the service’s stop and start commands will be used.

Attributes

service { 'resource title':
  name       => # (namevar) The name of the service to run.  This name is...
  ensure     => # Whether a service should be running.  Valid...
  binary     => # The path to the daemon.  This is only used for...
  control    => # The control variable used to manage services...
  enable     => # Whether a service should be enabled to start at...
  flags      => # Specify a string of flags to pass to the startup 
  hasrestart => # Specify that an init script has a `restart...
  hasstatus  => # Declare whether the service's init script has a...
  manifest   => # Specify a command to config a service, or a path 
  path       => # The search path for finding init scripts....
  pattern    => # The pattern to search for in the process table...
  provider   => # The specific backend to use for this `service...
  restart    => # Specify a *restart* command manually.  If left...
  start      => # Specify a *start* command manually.  Most...
  status     => # Specify a *status* command manually.  This...
  stop       => # Specify a *stop* command...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the service to run.

This name is used to find the service; on platforms where services have short system names and long display names, this should be the short name. (To take an example from Windows, you would use “wuauserv” rather than “Automatic Updates.”)

(↑ Back to service attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

Whether a service should be running.

Valid values are stopped (also called false), running (also called true).

(↑ Back to service attributes)

binary

The path to the daemon. This is only used for systems that do not support init scripts. This binary will be used to start the service if no start parameter is provided.

(↑ Back to service attributes)

control

The control variable used to manage services (originally for HP-UX). Defaults to the upcased service name plus START replacing dots with underscores, for those providers that support the controllable feature.

(↑ Back to service attributes)

enable

(Property: This attribute represents concrete state on the target system.)

Whether a service should be enabled to start at boot. This property behaves quite differently depending on the platform; wherever possible, it relies on local tools to enable or disable a given service.

Valid values are true, false, manual, mask.

Requires features enableable.

(↑ Back to service attributes)

flags

(Property: This attribute represents concrete state on the target system.)

Specify a string of flags to pass to the startup script.

Requires features flaggable.

(↑ Back to service attributes)

hasrestart

Specify that an init script has a restart command. If this is false and you do not specify a command in the restart attribute, the init script’s stop and start commands will be used.

Defaults to false.

Valid values are true, false.

(↑ Back to service attributes)

hasstatus

Declare whether the service’s init script has a functional status command; defaults to true. This attribute’s default value changed in Puppet 2.7.0.

The init script’s status command must return 0 if the service is running and a nonzero value otherwise. Ideally, these exit codes should conform to the LSB’s specification for init script status actions, but Puppet only considers the difference between 0 and nonzero to be relevant.

If a service’s init script does not support any kind of status command, you should set hasstatus to false and either provide a specific command using the status attribute or expect that Puppet will look for the service name in the process table. Be aware that ‘virtual’ init scripts (like ‘network’ under Red Hat systems) will respond poorly to refresh events from other resources if you override the default behavior without providing a status command.

Valid values are true, false.

(↑ Back to service attributes)

manifest

Specify a command to config a service, or a path to a manifest to do so.

(↑ Back to service attributes)

path

The search path for finding init scripts. Multiple values should be separated by colons or provided as an array.

(↑ Back to service attributes)

pattern

The pattern to search for in the process table. This is used for stopping services on platforms that do not support init scripts, and is also used for determining service status on those service whose init scripts do not include a status command.

Defaults to the name of the service. The pattern can be a simple string or any legal Ruby pattern, including regular expressions (which should be quoted without enclosing slashes).

(↑ Back to service attributes)

provider

The specific backend to use for this service resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to service attributes)

restart

Specify a restart command manually. If left unspecified, the service will be stopped and then started.

(↑ Back to service attributes)

start

Specify a start command manually. Most service subsystems support a start command, so this will not need to be specified.

(↑ Back to service attributes)

status

Specify a status command manually. This command must return 0 if the service is running and a nonzero value otherwise. Ideally, these exit codes should conform to the LSB’s specification for init script status actions, but Puppet only considers the difference between 0 and nonzero to be relevant.

If left unspecified, the status of the service will be determined automatically, usually by looking for the service in the process table.

(↑ Back to service attributes)

stop

Specify a stop command manually.

(↑ Back to service attributes)

Providers

base

The simplest form of Unix service support.

You have to specify enough about your service for this to work; the minimum you can specify is a binary for starting the process, and this same binary will be searched for in the process table to stop the service. As with init-style services, it is preferable to specify start, stop, and status commands.

  • Required binaries: kill.
  • Supported features: refreshable.

bsd

Generic BSD form of init-style service management with rc.d.

Uses rc.conf.d for service enabling and disabling.

  • Supported features: enableable, refreshable.

daemontools

Daemontools service management.

This provider manages daemons supervised by D.J. Bernstein daemontools. When detecting the service directory it will check, in order of preference:

  • /service
  • /etc/service
  • /var/lib/svscan

The daemon directory should be in one of the following locations:

  • /var/lib/service
  • /etc

…or this can be overridden in the resource’s attributes:

service { 'myservice':
  provider => 'daemontools',
  path     => '/path/to/daemons',
}

This provider supports out of the box:

  • start/stop (mapped to enable/disable)
  • enable/disable
  • restart
  • status

If a service has ensure => "running", it will link /path/to/daemon to /path/to/service, which will automatically enable the service.

If a service has ensure => "stopped", it will only shut down the service, not remove the /path/to/service link.

  • Required binaries: /usr/bin/svc, /usr/bin/svstat.
  • Supported features: enableable, refreshable.

debian

Debian’s form of init-style management.

The only differences from init are support for enabling and disabling services via update-rc.d and the ability to determine enabled status via invoke-rc.d.

  • Required binaries: /usr/sbin/invoke-rc.d, /usr/sbin/service, /usr/sbin/update-rc.d.
  • Default for operatingsystem == cumuluslinux and operatingsystemmajrelease == 1, 2. Default for operatingsystem == debian and operatingsystemmajrelease == 5, 6, 7.
  • Supported features: enableable, refreshable.

freebsd

Provider for FreeBSD and DragonFly BSD. Uses the rcvar argument of init scripts and parses/edits rc files.

  • Default for operatingsystem == freebsd, dragonfly.
  • Supported features: enableable, refreshable.

gentoo

Gentoo’s form of init-style service management.

Uses rc-update for service enabling and disabling.

  • Required binaries: /sbin/rc-update.
  • Supported features: enableable, refreshable.

init

Standard init-style service management.

  • Supported features: refreshable.

launchd

This provider manages jobs with launchd, which is the default service framework for Mac OS X (and may be available for use on other platforms).

For more information, see the launchd man page:

This provider reads plists out of the following directories:

  • /System/Library/LaunchDaemons
  • /System/Library/LaunchAgents
  • /Library/LaunchDaemons
  • /Library/LaunchAgents

…and builds up a list of services based upon each plist’s “Label” entry.

This provider supports:

  • ensure => running/stopped,
  • enable => true/false
  • status
  • restart

Here is how the Puppet states correspond to launchd states:

  • stopped — job unloaded
  • started — job loaded
  • enabled — ‘Disable’ removed from job plist file
  • disabled — ‘Disable’ added to job plist file

Note that this allows you to do something launchctl can’t do, which is to be in a state of “stopped/enabled” or “running/disabled”.

Note that this provider does not support overriding ‘restart’

  • Required binaries: /bin/launchctl.
  • Default for operatingsystem == darwin.
  • Supported features: enableable, refreshable.

openbsd

Provider for OpenBSD’s rc.d daemon control scripts

  • Required binaries: /usr/sbin/rcctl.
  • Default for operatingsystem == openbsd.
  • Supported features: enableable, flaggable, refreshable.

openrc

Support for Gentoo’s OpenRC initskripts

Uses rc-update, rc-status and rc-service to manage services.

  • Required binaries: /bin/rc-status, /sbin/rc-service, /sbin/rc-update.
  • Default for operatingsystem == gentoo. Default for operatingsystem == funtoo.
  • Supported features: enableable, refreshable.

openwrt

Support for OpenWrt flavored init scripts.

Uses /etc/init.d/service_name enable, disable, and enabled.

  • Default for operatingsystem == openwrt.
  • Supported features: enableable, refreshable.

rcng

RCng service management with rc.d

  • Default for operatingsystem == netbsd, cargos.
  • Supported features: enableable, refreshable.

redhat

Red Hat’s (and probably many others’) form of init-style service management. Uses chkconfig for service enabling and disabling.

  • Required binaries: /sbin/chkconfig, /sbin/service.
  • Default for osfamily == redhat. Default for operatingsystemmajrelease == 10, 11 and osfamily == suse.
  • Supported features: enableable, refreshable.

runit

Runit service management.

This provider manages daemons running supervised by Runit. When detecting the service directory it will check, in order of preference:

  • /service
  • /etc/service
  • /var/service

The daemon directory should be in one of the following locations:

  • /etc/sv
  • /var/lib/service

or this can be overridden in the service resource parameters:

service { 'myservice':
  provider => 'runit',
  path     => '/path/to/daemons',
}

This provider supports out of the box:

  • start/stop
  • enable/disable
  • restart
  • status

  • Required binaries: /usr/bin/sv.
  • Supported features: enableable, refreshable.

service

The simplest form of service support.

  • Supported features: refreshable.

smf

Support for Sun’s new Service Management Framework.

Starting a service is effectively equivalent to enabling it, so there is only support for starting and stopping services, which also enables and disables them, respectively.

By specifying manifest => "/path/to/service.xml", the SMF manifest will be imported if it does not exist.

  • Required binaries: /usr/bin/svcs, /usr/sbin/svcadm, /usr/sbin/svccfg.
  • Default for osfamily == solaris.
  • Supported features: enableable, refreshable.

src

Support for AIX’s System Resource controller.

Services are started/stopped based on the stopsrc and startsrc commands, and some services can be refreshed with refresh command.

Enabling and disabling services is not supported, as it requires modifications to /etc/inittab. Starting and stopping groups of subsystems is not yet supported.

  • Required binaries: /usr/bin/lssrc, /usr/bin/refresh, /usr/bin/startsrc, /usr/bin/stopsrc, /usr/sbin/chitab, /usr/sbin/lsitab, /usr/sbin/mkitab, /usr/sbin/rmitab.
  • Default for operatingsystem == aix.
  • Supported features: enableable, refreshable.

systemd

Manages systemd services using systemctl.

Because systemd defaults to assuming the .service unit type, the suffix may be omitted. Other unit types (such as .path) may be managed by providing the proper suffix.

  • Required binaries: systemctl.
  • Default for osfamily == archlinux. Default for operatingsystemmajrelease == 7 and osfamily == redhat. Default for operatingsystem == fedora and osfamily == redhat. Default for osfamily == suse. Default for osfamily == coreos. Default for operatingsystem == amazon and operatingsystemmajrelease == 2. Default for operatingsystem == debian and operatingsystemmajrelease == 8, stretch/sid, 9, buster/sid. Default for operatingsystem == ubuntu and operatingsystemmajrelease == 15.04, 15.10, 16.04, 16.10, 17.04, 17.10, 18.04. Default for operatingsystem == cumuluslinux and operatingsystemmajrelease == 3.
  • Supported features: enableable, maskable, refreshable.

upstart

Ubuntu service management with upstart.

This provider manages upstart jobs on Ubuntu. For upstart documentation, see http://upstart.ubuntu.com/.

  • Required binaries: /sbin/initctl, /sbin/restart, /sbin/start, /sbin/status, /sbin/stop.
  • Default for operatingsystem == ubuntu and operatingsystemmajrelease == 10.04, 12.04, 14.04, 14.10.
  • Supported features: enableable, refreshable.

windows

Support for Windows Service Control Manager (SCM). This provider can start, stop, enable, and disable services, and the SCM provides working status methods for all services.

Control of service groups (dependencies) is not yet supported, nor is running services as a specific user.

  • Required binaries: net.exe.
  • Default for operatingsystem == windows.
  • Supported features: enableable, refreshable.

Provider Features

Available features:

  • controllable — The provider uses a control variable.
  • enableable — The provider can enable and disable the service
  • flaggable — The provider can pass flags to the service.
  • maskable — The provider can ‘mask’ the service.
  • refreshable — The provider can restart the service.

Provider support:

Provider controllable enableable flaggable maskable refreshable
base X
bsd X X
daemontools X X
debian X X
freebsd X X
gentoo X X
init X
launchd X X
openbsd X X X
openrc X X
openwrt X X
rcng X X
redhat X X
runit X X
service X
smf X X
src X X
systemd X X X
upstart X X
windows X X

ssh_authorized_key

Description

Manages SSH authorized keys. Currently only type 2 keys are supported.

In their native habitat, SSH keys usually appear as a single long line, in the format <TYPE> <KEY> <NAME/COMMENT>. This resource type requires you to split that line into several attributes. Thus, a key that appears in your ~/.ssh/id_rsa.pub file like this…

ssh-rsa AAAAB3Nza[...]qXfdaQ== nick@magpie.example.com

…would translate to the following resource:

ssh_authorized_key { 'nick@magpie.example.com':
  ensure => present,
  user   => 'nick',
  type   => 'ssh-rsa',
  key    => 'AAAAB3Nza[...]qXfdaQ==',
}

To ensure that only the currently approved keys are present, you can purge unmanaged SSH keys on a per-user basis. Do this with the user resource type’s purge_ssh_keys attribute:

user { 'nick':
  ensure         => present,
  purge_ssh_keys => true,
}

This will remove any keys in ~/.ssh/authorized_keys that aren’t being managed with ssh_authorized_key resources. See the documentation of the user type for more details.

Autorequires: If Puppet is managing the user account in which this SSH key should be installed, the ssh_authorized_key resource will autorequire that user.

Attributes

ssh_authorized_key { 'resource title':
  name     => # (namevar) The SSH key comment. This can be anything, and...
  ensure   => # The basic property that the resource should be...
  key      => # The public key itself; generally a long string...
  options  => # Key options; see sshd(8) for possible values...
  provider => # The specific backend to use for this...
  target   => # The absolute filename in which to store the SSH...
  type     => # The encryption type used.  Valid values are...
  user     => # The user account in which the SSH key should be...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The SSH key comment. This can be anything, and doesn’t need to match the original comment from the .pub file.

Due to internal limitations, this must be unique across all user accounts; if you want to specify one key for multiple users, you must use a different comment for each instance.

(↑ Back to ssh_authorized_key attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to ssh_authorized_key attributes)

key

(Property: This attribute represents concrete state on the target system.)

The public key itself; generally a long string of hex characters. The key attribute may not contain whitespace.

Make sure to omit the following in this attribute (and specify them in other attributes):

  • Key headers, such as ‘ssh-rsa’ — put these in the type attribute.
  • Key identifiers / comments, such as ‘joe@joescomputer.local’ — put these in the name attribute/resource title.

(↑ Back to ssh_authorized_key attributes)

options

(Property: This attribute represents concrete state on the target system.)

Key options; see sshd(8) for possible values. Multiple values should be specified as an array.

(↑ Back to ssh_authorized_key attributes)

provider

The specific backend to use for this ssh_authorized_key resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to ssh_authorized_key attributes)

target

(Property: This attribute represents concrete state on the target system.)

The absolute filename in which to store the SSH key. This property is optional and should be used only in cases where keys are stored in a non-standard location, for instance when not in ~user/.ssh/authorized_keys.

(↑ Back to ssh_authorized_key attributes)

type

(Property: This attribute represents concrete state on the target system.)

The encryption type used.

Valid values are ssh-dss (also called dsa), ssh-rsa (also called rsa), ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, ssh-ed25519 (also called ed25519).

(↑ Back to ssh_authorized_key attributes)

user

(Property: This attribute represents concrete state on the target system.)

The user account in which the SSH key should be installed. The resource will autorequire this user if it is being managed as a user resource.

(↑ Back to ssh_authorized_key attributes)

Providers

parsed

Parse and generate authorized_keys files for SSH.

sshkey

Description

Installs and manages ssh host keys. By default, this type will install keys into /etc/ssh/ssh_known_hosts. To manage ssh keys in a different known_hosts file, such as a user’s personal known_hosts, pass its path to the target parameter. See the ssh_authorized_key type to manage authorized keys.

Attributes

sshkey { 'resource title':
  name         => # (namevar) The host name that the key is associated...
  ensure       => # The basic property that the resource should be...
  host_aliases => # Any aliases the host might have.  Multiple...
  key          => # The key itself; generally a long string of...
  provider     => # The specific backend to use for this `sshkey...
  target       => # The file in which to store the ssh key.  Only...
  type         => # The encryption type used.  Probably ssh-dss or...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The host name that the key is associated with.

(↑ Back to sshkey attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to sshkey attributes)

host_aliases

(Property: This attribute represents concrete state on the target system.)

Any aliases the host might have. Multiple values must be specified as an array.

(↑ Back to sshkey attributes)

key

(Property: This attribute represents concrete state on the target system.)

The key itself; generally a long string of uuencoded characters. The key attribute may not contain whitespace.

Make sure to omit the following in this attribute (and specify them in other attributes):

  • Key headers, such as ‘ssh-rsa’ — put these in the type attribute.
  • Key identifiers / comments, such as ‘joescomputer.local’ — put these in the name attribute/resource title.

(↑ Back to sshkey attributes)

provider

The specific backend to use for this sshkey resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to sshkey attributes)

target

(Property: This attribute represents concrete state on the target system.)

The file in which to store the ssh key. Only used by the parsed provider.

(↑ Back to sshkey attributes)

type

(Property: This attribute represents concrete state on the target system.)

The encryption type used. Probably ssh-dss or ssh-rsa.

Valid values are ssh-dss (also called dsa), ssh-ed25519 (also called ed25519), ssh-rsa (also called rsa), ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521.

(↑ Back to sshkey attributes)

Providers

parsed

Parse and generate host-wide known hosts files for SSH.

stage

Description

A resource type for creating new run stages. Once a stage is available, classes can be assigned to it by declaring them with the resource-like syntax and using the stage metaparameter.

Note that new stages are not useful unless you also declare their order in relation to the default main stage.

A complete run stage example:

stage { 'pre':
  before => Stage['main'],
}

class { 'apt-updates':
  stage => 'pre',
}

Individual resources cannot be assigned to run stages; you can only set stages for classes.

Attributes

stage { 'resource title':
  name => # (namevar) The name of the stage. Use this as the value for 
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the stage. Use this as the value for the stage metaparameter when assigning classes to this stage.

(↑ Back to stage attributes)

tidy

Description

Remove unwanted files based on specific criteria. Multiple criteria are OR’d together, so a file that is too large but is not old enough will still get tidied.

If you don’t specify either age or size, then all files will be removed.

This resource type works by generating a file resource for every file that should be deleted and then letting that resource perform the actual deletion.

Attributes

tidy { 'resource title':
  path    => # (namevar) The path to the file or directory to manage....
  age     => # Tidy files whose age is equal to or greater than 
  backup  => # Whether tidied files should be backed up.  Any...
  matches => # One or more (shell type) file glob patterns...
  recurse => # If target is a directory, recursively descend...
  rmdirs  => # Tidy directories in addition to files; that is...
  size    => # Tidy files whose size is equal to or greater...
  type    => # Set the mechanism for determining age. Default...
  # ...plus any applicable metaparameters.
}

path

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The path to the file or directory to manage. Must be fully qualified.

(↑ Back to tidy attributes)

age

Tidy files whose age is equal to or greater than the specified time. You can choose seconds, minutes, hours, days, or weeks by specifying the first letter of any of those words (for example, ‘1w’ represents one week).

Specifying 0 will remove all files.

(↑ Back to tidy attributes)

backup

Whether tidied files should be backed up. Any values are passed directly to the file resources used for actual file deletion, so consult the file type’s backup documentation to determine valid values.

(↑ Back to tidy attributes)

matches

One or more (shell type) file glob patterns, which restrict the list of files to be tidied to those whose basenames match at least one of the patterns specified. Multiple patterns can be specified using an array.

Example:

tidy { '/tmp':
  age     => '1w',
  recurse => 1,
  matches => [ '[0-9]pub*.tmp', '*.temp', 'tmpfile?' ],
}

This removes files from /tmp if they are one week old or older, are not in a subdirectory and match one of the shell globs given.

Note that the patterns are matched against the basename of each file – that is, your glob patterns should not have any ‘/’ characters in them, since you are only specifying against the last bit of the file.

Finally, note that you must now specify a non-zero/non-false value for recurse if matches is used, as matches only apply to files found by recursion (there’s no reason to use static patterns match against a statically determined path). Requiring explicit recursion clears up a common source of confusion.

(↑ Back to tidy attributes)

recurse

If target is a directory, recursively descend into the directory looking for files to tidy.

Valid values are true, false, inf. Values can match /^[0-9]+$/.

(↑ Back to tidy attributes)

rmdirs

Tidy directories in addition to files; that is, remove directories whose age is older than the specified criteria. This will only remove empty directories, so all contained files must also be tidied before a directory gets removed.

Valid values are true, false, yes, no.

(↑ Back to tidy attributes)

size

Tidy files whose size is equal to or greater than the specified size. Unqualified values are in kilobytes, but b, k, m, g, and t can be appended to specify bytes, kilobytes, megabytes, gigabytes, and terabytes, respectively. Only the first character is significant, so the full word can also be used.

(↑ Back to tidy attributes)

type

Set the mechanism for determining age. Default: atime.

Valid values are atime, mtime, ctime.

(↑ Back to tidy attributes)

user

Description

Manage users. This type is mostly built to manage system users, so it is lacking some features useful for managing normal 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/passwd or anything.

Autorequires: If Puppet is managing the user’s primary group (as provided in the gid attribute) or any group listed in the groups attribute then the user resource will autorequire that group. If Puppet is managing any role accounts corresponding to the user’s roles, the user resource will autorequire those role accounts.

Attributes

user { 'resource title':
  name                 => # (namevar) The user name. While naming limitations vary by...
  ensure               => # The basic state that the object should be in....
  allowdupe            => # Whether to allow duplicate UIDs. Defaults to...
  attribute_membership => # Whether specified attribute value pairs should...
  attributes           => # Specify AIX attributes for the user in an array...
  auth_membership      => # Whether specified auths should be considered the 
  auths                => # The auths the user has.  Multiple auths should...
  comment              => # A description of the user.  Generally the user's 
  expiry               => # The expiry date for this user. Provide as either 
  forcelocal           => # Forces the management of local accounts when...
  gid                  => # The user's primary group.  Can be specified...
  groups               => # The groups to which the user belongs.  The...
  home                 => # The home directory of the user.  The directory...
  ia_load_module       => # The name of the I&A module to use to manage this 
  iterations           => # This is the number of iterations of a chained...
  key_membership       => # Whether specified key/value pairs should be...
  keys                 => # Specify user attributes in an array of key ...
  loginclass           => # The name of login class to which the user...
  managehome           => # Whether to manage the home directory when Puppet 
  membership           => # If `minimum` is specified, Puppet will ensure...
  password             => # The user's password, in whatever encrypted...
  password_max_age     => # The maximum number of days a password may be...
  password_min_age     => # The minimum number of days a password must be...
  password_warn_days   => # The number of days before a password is going to 
  profile_membership   => # Whether specified roles should be treated as the 
  profiles             => # The profiles the user has.  Multiple profiles...
  project              => # The name of the project associated with a user.  
  provider             => # The specific backend to use for this `user...
  purge_ssh_keys       => # Whether to purge authorized SSH keys for this...
  role_membership      => # Whether specified roles should be considered the 
  roles                => # The roles the user has.  Multiple roles should...
  salt                 => # This is the 32-byte salt used to generate the...
  shell                => # The user's login shell.  The shell must exist...
  system               => # Whether the user is a system user, according to...
  uid                  => # The user ID; must be specified numerically. If...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The user name. While naming limitations vary by operating system, it is advisable to restrict names to the lowest common denominator, which is a maximum of 8 characters beginning with a letter.

Note that Puppet considers user names to be case-sensitive, regardless of the platform’s own rules; be sure to always use the same case when referring to a given user.

(↑ Back to user attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic state that the object should be in.

Valid values are present, absent, role.

(↑ Back to user attributes)

allowdupe

Whether to allow duplicate UIDs. Defaults to false.

Valid values are true, false, yes, no.

(↑ Back to user attributes)

attribute_membership

Whether specified attribute value pairs should be treated as the complete list (inclusive) or the minimum list (minimum) of attribute/value pairs for the user. Defaults to minimum.

Valid values are inclusive, minimum.

(↑ Back to user attributes)

attributes

(Property: This attribute represents concrete state on the target system.)

Specify AIX attributes for the user in an array of attribute = value pairs.

Requires features manages_aix_lam.

(↑ Back to user attributes)

auth_membership

Whether specified auths should be considered the complete list (inclusive) or the minimum list (minimum) of auths the user has. Defaults to minimum.

Valid values are inclusive, minimum.

(↑ Back to user attributes)

auths

(Property: This attribute represents concrete state on the target system.)

The auths the user has. Multiple auths should be specified as an array.

Requires features manages_solaris_rbac.

(↑ Back to user attributes)

comment

(Property: This attribute represents concrete state on the target system.)

A description of the user. Generally the user’s full name.

(↑ Back to user attributes)

expiry

(Property: This attribute represents concrete state on the target system.)

The expiry date for this user. Provide as either the special value absent to ensure that the account never expires, or as a zero-padded YYYY-MM-DD format – for example, 2010-02-19.

Valid values are absent. Values can match /^\d{4}-\d{2}-\d{2}$/.

Requires features manages_expiry.

(↑ Back to user attributes)

forcelocal

Forces the management of local accounts when accounts are also being managed by some other NSS

Valid values are true, false, yes, no.

Requires features libuser.

(↑ Back to user attributes)

gid

(Property: This attribute represents concrete state on the target system.)

The user’s primary group. Can be specified numerically or by name.

This attribute is not supported on Windows systems; use the groups attribute instead. (On Windows, designating a primary group is only meaningful for domain accounts, which Puppet does not currently manage.)

(↑ Back to user attributes)

groups

(Property: This attribute represents concrete state on the target system.)

The groups to which the user belongs. The primary group should not be listed, and groups should be identified by name rather than by GID. Multiple groups should be specified as an array.

(↑ Back to user attributes)

home

(Property: This attribute represents concrete state on the target system.)

The home directory of the user. The directory must be created separately and is not currently checked for existence.

(↑ Back to user attributes)

ia_load_module

The name of the I&A module to use to manage this user.

Requires features manages_aix_lam.

(↑ Back to user attributes)

iterations

(Property: This attribute represents concrete state on the target system.)

This is the number of iterations of a chained computation of the PBKDF2 password hash. This parameter is used in OS X, and is required for managing passwords on OS X 10.8 and newer.

Requires features manages_password_salt.

(↑ Back to user attributes)

key_membership

Whether specified key/value pairs should be considered the complete list (inclusive) or the minimum list (minimum) of the user’s attributes. Defaults to minimum.

Valid values are inclusive, minimum.

(↑ Back to user attributes)

keys

(Property: This attribute represents concrete state on the target system.)

Specify user attributes in an array of key = value pairs.

Requires features manages_solaris_rbac.

(↑ Back to user attributes)

loginclass

(Property: This attribute represents concrete state on the target system.)

The name of login class to which the user belongs.

Requires features manages_loginclass.

(↑ Back to user attributes)

managehome

Whether to manage the home directory when Puppet creates or removes the user. This creates the home directory if Puppet also creates the user account, and deletes the home directory if Puppet also removes the user account. Defaults to false.

This parameter has no effect unless Puppet is also creating or removing the user in the resource at the same time. For instance, Puppet creates a home directory for a managed user if ensure => present and the user does not exist at the time of the Puppet run. If the home directory is then deleted manually, Puppet will not recreate it on the next run.

Valid values are true, false, yes, no.

(↑ Back to user attributes)

membership

If minimum is specified, Puppet will ensure that the user is a member of all specified groups, but will not remove any other groups that the user is a part of.

If inclusive is specified, Puppet will ensure that the user is a member of only specified groups.

Defaults to minimum.

Valid values are inclusive, minimum.

(↑ Back to user attributes)

password

(Property: This attribute represents concrete state on the target system.)

The user’s password, in whatever encrypted format the local system requires. Consult your operating system’s documentation for acceptable password encryption formats and requirements.

  • Mac OS X 10.5 and 10.6, and some older Linux distributions, use salted SHA1 hashes. You can use Puppet’s built-in sha1 function to generate a salted SHA1 hash from a password.
  • Mac OS X 10.7 (Lion), and many recent Linux distributions, use salted SHA512 hashes. The Puppet Labs stdlib module contains a str2saltedsha512 function which can generate password hashes for these operating systems.
  • OS X 10.8 and higher use salted SHA512 PBKDF2 hashes. When managing passwords on these systems, the salt and iterations attributes need to be specified as well as the password.
  • Windows passwords can be managed only in cleartext, because there is no Windows API for setting the password hash.

Enclose any value that includes a dollar sign ($) in single quotes (‘) to avoid accidental variable interpolation.

To redact passwords from reports to PuppetDB, use the Sensitive data type. For example, this resource protects the password:

user { 'foo':
  ensure   => present,
  password => Sensitive("my secret password")
}

This results in the password being redacted from the report, as in the previous_value, desired_value, and message fields below.

    events:
    - !ruby/object:Puppet::Transaction::Event
      audited: false
      property: password
      previous_value: "[redacted]"
      desired_value: "[redacted]"
      historical_value:
      message: changed [redacted] to [redacted]
      name: :password_changed
      status: success
      time: 2017-05-17 16:06:02.934398293 -07:00
      redacted: true
      corrective_change: false
    corrective_change: false

Requires features manages_passwords.

(↑ Back to user attributes)

password_max_age

(Property: This attribute represents concrete state on the target system.)

The maximum number of days a password may be used before it must be changed.

Requires features manages_password_age.

(↑ Back to user attributes)

password_min_age

(Property: This attribute represents concrete state on the target system.)

The minimum number of days a password must be used before it may be changed.

Requires features manages_password_age.

(↑ Back to user attributes)

password_warn_days

(Property: This attribute represents concrete state on the target system.)

The number of days before a password is going to expire (see the maximum password age) during which the user should be warned.

Requires features manages_password_age.

(↑ Back to user attributes)

profile_membership

Whether specified roles should be treated as the complete list (inclusive) or the minimum list (minimum) of roles of which the user is a member. Defaults to minimum.

Valid values are inclusive, minimum.

(↑ Back to user attributes)

profiles

(Property: This attribute represents concrete state on the target system.)

The profiles the user has. Multiple profiles should be specified as an array.

Requires features manages_solaris_rbac.

(↑ Back to user attributes)

project

(Property: This attribute represents concrete state on the target system.)

The name of the project associated with a user.

Requires features manages_solaris_rbac.

(↑ Back to user attributes)

provider

The specific backend to use for this user resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to user attributes)

purge_ssh_keys

Whether to purge authorized SSH keys for this user if they are not managed with the ssh_authorized_key resource type. Allowed values are:

  • false (default) — don’t purge SSH keys for this user.
  • true — look for keys in the .ssh/authorized_keys file in the user’s home directory. Purge any keys that aren’t managed as ssh_authorized_key resources.
  • An array of file paths — look for keys in all of the files listed. Purge any keys that aren’t managed as ssh_authorized_key resources. If any of these paths starts with ~ or %h, that token will be replaced with the user’s home directory.

Valid values are true, false.

(↑ Back to user attributes)

role_membership

Whether specified roles should be considered the complete list (inclusive) or the minimum list (minimum) of roles the user has. Defaults to minimum.

Valid values are inclusive, minimum.

(↑ Back to user attributes)

roles

(Property: This attribute represents concrete state on the target system.)

The roles the user has. Multiple roles should be specified as an array.

Requires features manages_solaris_rbac.

(↑ Back to user attributes)

salt

(Property: This attribute represents concrete state on the target system.)

This is the 32-byte salt used to generate the PBKDF2 password used in OS X. This field is required for managing passwords on OS X >= 10.8.

Requires features manages_password_salt.

(↑ Back to user attributes)

shell

(Property: This attribute represents concrete state on the target system.)

The user’s login shell. The shell must exist and be executable.

This attribute cannot be managed on Windows systems.

Requires features manages_shell.

(↑ Back to user attributes)

system

Whether the user is a system user, according to the OS’s criteria; on most platforms, a UID less than or equal to 500 indicates a system user. This parameter is only used when the resource is created and will not affect the UID when the user is present. Defaults to false.

Valid values are true, false, yes, no.

(↑ Back to user attributes)

uid

(Property: This attribute represents concrete state on the target system.)

The user ID; must be specified numerically. If no user ID is specified when creating a new user, then one will be chosen automatically. This will likely result in the same user having different UIDs on different systems, which is not recommended. This is especially noteworthy when managing the same user on both Darwin and other platforms, since Puppet does UID generation on Darwin, but the underlying tools do so on other platforms.

On Windows, this property is read-only and will return the user’s security identifier (SID).

(↑ Back to user attributes)

Providers

aix

User management for AIX.

  • Required binaries: /bin/chpasswd, /usr/bin/chuser, /usr/bin/mkuser, /usr/sbin/lsgroup, /usr/sbin/lsuser, /usr/sbin/rmuser.
  • Default for operatingsystem == aix.
  • Supported features: manages_aix_lam, manages_expiry, manages_homedir, manages_password_age, manages_passwords, manages_shell.

directoryservice

User management on OS X.

  • Required binaries: /usr/bin/dscacheutil, /usr/bin/dscl, /usr/bin/dsimport, /usr/bin/uuidgen.
  • Default for operatingsystem == darwin.
  • Supported features: manages_password_salt, manages_passwords, manages_shell.

hpuxuseradd

User management for HP-UX. This provider uses the undocumented -F switch to HP-UX’s special usermod binary to work around the fact that its standard usermod cannot make changes while the user is logged in. New functionality provides for changing trusted computing passwords and resetting password expirations under trusted computing.

  • Required binaries: /usr/sam/lbin/useradd.sam, /usr/sam/lbin/userdel.sam, /usr/sam/lbin/usermod.sam.
  • Default for operatingsystem == hp-ux.
  • Supported features: allows_duplicates, manages_homedir, manages_passwords.

ldap

User management via LDAP.

This provider requires that you have valid values for all of the LDAP-related settings in puppet.conf, including ldapbase. You will almost definitely need settings for ldapuser and ldappassword in order for your clients to write to LDAP.

Note that this provider will automatically generate a UID for you if you do not specify one, but it is a potentially expensive operation, as it iterates across all existing users to pick the appropriate next one.

  • Supported features: manages_passwords, manages_shell.

openbsd

User management via useradd and its ilk for OpenBSD. Note that you will need to install Ruby’s shadow password library (package known as ruby-shadow) if you wish to manage user passwords.

  • Required binaries: passwd, useradd, userdel, usermod.
  • Default for operatingsystem == openbsd.
  • Supported features: manages_expiry, manages_homedir, manages_shell, system_users.

pw

User management via pw on FreeBSD and DragonFly BSD.

  • Required binaries: pw.
  • Default for operatingsystem == freebsd, dragonfly.
  • Supported features: allows_duplicates, manages_expiry, manages_homedir, manages_passwords, manages_shell.

user_role_add

User and role management on Solaris, via useradd and roleadd.

  • Required binaries: passwd, roleadd, roledel, rolemod, useradd, userdel, usermod.
  • Default for osfamily == solaris.
  • Supported features: allows_duplicates, manages_homedir, manages_password_age, manages_passwords, manages_shell, manages_solaris_rbac.

useradd

User management via useradd and its ilk. Note that you will need to install Ruby’s shadow password library (often known as ruby-libshadow) if you wish to manage user passwords.

  • Required binaries: chage, lchage, luseradd, luserdel, lusermod, useradd, userdel, usermod.
  • Supported features: allows_duplicates, manages_expiry, manages_homedir, manages_shell, system_users.

windows_adsi

Local user management for Windows.

  • Default for operatingsystem == windows.
  • Supported features: manages_homedir, manages_passwords.

Provider Features

Available features:

  • allows_duplicates — The provider supports duplicate users with the same UID.
  • libuser — Allows local users to be managed on systems that also use some other remote NSS method of managing accounts.
  • manages_aix_lam — The provider can manage AIX Loadable Authentication Module (LAM) system.
  • manages_expiry — The provider can manage the expiry date for a user.
  • manages_homedir — The provider can create and remove home directories.
  • manages_loginclass — The provider can manage the login class for a user.
  • manages_password_age — The provider can set age requirements and restrictions for passwords.
  • manages_password_salt — The provider can set a password salt. This is for providers that implement PBKDF2 passwords with salt properties.
  • manages_passwords — The provider can modify user passwords, by accepting a password hash.
  • manages_shell — The provider allows for setting shell and validates if possible
  • manages_solaris_rbac — The provider can manage roles and normal users
  • system_users — The provider allows you to create system users with lower UIDs.

Provider support:

Provider allows duplicates libuser manages aix lam manages expiry manages homedir manages loginclass manages password age manages password salt manages passwords manages shell manages solaris rbac system users
aix X X X X X X
directoryservice X X X
hpuxuseradd X X X
ldap X X
openbsd X X X X X X
pw X X X X X
user_role_add X X X X X X
useradd X X X X X X X X
windows_adsi X X

vlan

Description

Manages a VLAN on a router or switch.

Attributes

vlan { 'resource title':
  name        => # (namevar) The numeric VLAN ID.  Values can match...
  ensure      => # The basic property that the resource should be...
  description => # The VLAN's...
  device_url  => # The URL of the router or switch maintaining this 
  provider    => # The specific backend to use for this `vlan...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The numeric VLAN ID.

Values can match /^\d+/.

(↑ Back to vlan attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to vlan attributes)

description

(Property: This attribute represents concrete state on the target system.)

The VLAN’s name.

(↑ Back to vlan attributes)

device_url

The URL of the router or switch maintaining this VLAN.

(↑ Back to vlan attributes)

provider

The specific backend to use for this vlan resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to vlan attributes)

Providers

cisco

Cisco switch/router provider for vlans.

yumrepo

Description

The client-side description of a yum repository. Repository configurations are found by parsing /etc/yum.conf and the files indicated by the reposdir option in that file (see yum.conf(5) for details).

Most parameters are identical to the ones documented in the yum.conf(5) man page.

Continuation lines that yum supports (for the baseurl, for example) are not supported. This type does not attempt to read or verify the existence of files listed in the include attribute.

Attributes

yumrepo { 'resource title':
  name                         => # (namevar) The name of the repository.  This corresponds to 
  ensure                       => # The basic property that the resource should be...
  assumeyes                    => # Determines if yum prompts for confirmation of...
  bandwidth                    => # Use to specify the maximum available network...
  baseurl                      => # The URL for this repository. Set this to...
  cost                         => # Cost of this repository. Set this to `absent` to 
  deltarpm_metadata_percentage => # Percentage value that determines when to...
  deltarpm_percentage          => # Percentage value that determines when to use...
  descr                        => # A human-readable description of the repository...
  enabled                      => # Whether this repository is enabled. Valid values 
  enablegroups                 => # Whether yum will allow the use of package groups 
  exclude                      => # The string of package names or shell globs...
  failovermethod               => # The failover method for this repository; should...
  gpgcakey                     => # The URL for the GPG CA key for this repository...
  gpgcheck                     => # Whether to check the GPG signature on packages...
  gpgkey                       => # The URL for the GPG key with which packages from 
  http_caching                 => # What to cache from this repository. Set this to...
  include                      => # The URL of a remote file containing additional...
  includepkgs                  => # The string of package names or shell globs...
  keepalive                    => # Whether HTTP/1.1 keepalive should be used with...
  metadata_expire              => # Number of seconds after which the metadata will...
  metalink                     => # Metalink for mirrors. Set this to `absent` to...
  mirrorlist                   => # The URL that holds the list of mirrors for this...
  mirrorlist_expire            => # Time (in seconds) after which the mirrorlist...
  password                     => # Password to use with the username for basic...
  payload_gpgcheck             => # Whether to check the GPG signature of the...
  priority                     => # Priority of this repository. Can be any integer...
  protect                      => # Enable or disable protection for this...
  provider                     => # The specific backend to use for this `yumrepo...
  proxy                        => # URL of a proxy server that Yum should use when...
  proxy_password               => # Password for this proxy. Set this to `absent` to 
  proxy_username               => # Username for this proxy. Set this to `absent` to 
  repo_gpgcheck                => # Whether to check the GPG signature on repodata...
  retries                      => # Set the number of times any attempt to retrieve...
  s3_enabled                   => # Access the repository via S3. Valid values are...
  skip_if_unavailable          => # Should yum skip this repository if unable to...
  sslcacert                    => # Path to the directory containing the databases...
  sslclientcert                => # Path  to the SSL client certificate yum should...
  sslclientkey                 => # Path to the SSL client key yum should use to...
  sslverify                    => # Should yum verify SSL certificates/hosts at all. 
  target                       => # The target parameter will be enabled in a future 
  throttle                     => # Enable bandwidth throttling for downloads. This...
  timeout                      => # Number of seconds to wait for a connection...
  username                     => # Username to use for basic authentication to a...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the repository. This corresponds to the repositoryid parameter in yum.conf(5).

(↑ Back to yumrepo attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to yumrepo attributes)

assumeyes

(Property: This attribute represents concrete state on the target system.)

Determines if yum prompts for confirmation of critical actions. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

bandwidth

(Property: This attribute represents concrete state on the target system.)

Use to specify the maximum available network bandwidth in bytes/second. Used with the throttle option. If throttle is a percentage and bandwidth is 0 then bandwidth throttling will be disabled. If throttle is expressed as a data rate then this option is ignored. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^\d+[kMG]?$/.

(↑ Back to yumrepo attributes)

baseurl

(Property: This attribute represents concrete state on the target system.)

The URL for this repository. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

cost

(Property: This attribute represents concrete state on the target system.)

Cost of this repository. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^\d+$/.

(↑ Back to yumrepo attributes)

deltarpm_metadata_percentage

(Property: This attribute represents concrete state on the target system.)

Percentage value that determines when to download deltarpm metadata. When the deltarpm metadata is larger than this percentage value of the package, deltarpm metadata is not downloaded. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^\d+$/.

(↑ Back to yumrepo attributes)

deltarpm_percentage

(Property: This attribute represents concrete state on the target system.)

Percentage value that determines when to use deltas for this repository. When the delta is larger than this percentage value of the package, the delta is not used. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^\d+$/.

(↑ Back to yumrepo attributes)

descr

(Property: This attribute represents concrete state on the target system.)

A human-readable description of the repository. This corresponds to the name parameter in yum.conf(5). Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

enabled

(Property: This attribute represents concrete state on the target system.)

Whether this repository is enabled. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

enablegroups

(Property: This attribute represents concrete state on the target system.)

Whether yum will allow the use of package groups for this repository. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

exclude

(Property: This attribute represents concrete state on the target system.)

The string of package names or shell globs separated by spaces to exclude. Packages that match the package name given or shell globs will never be considered in updates or installs for this repo. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

failovermethod

(Property: This attribute represents concrete state on the target system.)

The failover method for this repository; should be either roundrobin or priority. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^roundrobin|priority$/.

(↑ Back to yumrepo attributes)

gpgcakey

(Property: This attribute represents concrete state on the target system.)

The URL for the GPG CA key for this repository. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

gpgcheck

(Property: This attribute represents concrete state on the target system.)

Whether to check the GPG signature on packages installed from this repository. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

gpgkey

(Property: This attribute represents concrete state on the target system.)

The URL for the GPG key with which packages from this repository are signed. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

http_caching

(Property: This attribute represents concrete state on the target system.)

What to cache from this repository. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(packages|all|none)$/.

(↑ Back to yumrepo attributes)

include

(Property: This attribute represents concrete state on the target system.)

The URL of a remote file containing additional yum configuration settings. Puppet does not check for this file’s existence or validity. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

includepkgs

(Property: This attribute represents concrete state on the target system.)

The string of package names or shell globs separated by spaces to include. If this is set, only packages matching one of the package names or shell globs will be considered for update or install from this repository. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

keepalive

(Property: This attribute represents concrete state on the target system.)

Whether HTTP/1.1 keepalive should be used with this repository. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

metadata_expire

(Property: This attribute represents concrete state on the target system.)

Number of seconds after which the metadata will expire. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^([0-9]+[dhm]?|never)$/.

(↑ Back to yumrepo attributes)

(Property: This attribute represents concrete state on the target system.)

Metalink for mirrors. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

mirrorlist

(Property: This attribute represents concrete state on the target system.)

The URL that holds the list of mirrors for this repository. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

mirrorlist_expire

(Property: This attribute represents concrete state on the target system.)

Time (in seconds) after which the mirrorlist locally cached will expire. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^[0-9]+$/.

(↑ Back to yumrepo attributes)

password

(Property: This attribute represents concrete state on the target system.)

Password to use with the username for basic authentication. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

payload_gpgcheck

(Property: This attribute represents concrete state on the target system.)

Whether to check the GPG signature of the packages payload. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

priority

(Property: This attribute represents concrete state on the target system.)

Priority of this repository. Can be any integer value (including negative). Requires that the priorities plugin is installed and enabled. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^-?\d+$/.

(↑ Back to yumrepo attributes)

protect

(Property: This attribute represents concrete state on the target system.)

Enable or disable protection for this repository. Requires that the protectbase plugin is installed and enabled. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

provider

The specific backend to use for this yumrepo resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to yumrepo attributes)

proxy

(Property: This attribute represents concrete state on the target system.)

URL of a proxy server that Yum should use when accessing this repository. This attribute can also be set to '_none_', which will make Yum bypass any global proxy settings when accessing this repository. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

proxy_password

(Property: This attribute represents concrete state on the target system.)

Password for this proxy. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

proxy_username

(Property: This attribute represents concrete state on the target system.)

Username for this proxy. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

repo_gpgcheck

(Property: This attribute represents concrete state on the target system.)

Whether to check the GPG signature on repodata. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

retries

(Property: This attribute represents concrete state on the target system.)

Set the number of times any attempt to retrieve a file should retry before returning an error. Setting this to 0 makes yum try forever. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^[0-9]+$/.

(↑ Back to yumrepo attributes)

s3_enabled

(Property: This attribute represents concrete state on the target system.)

Access the repository via S3. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

skip_if_unavailable

(Property: This attribute represents concrete state on the target system.)

Should yum skip this repository if unable to reach it. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

sslcacert

(Property: This attribute represents concrete state on the target system.)

Path to the directory containing the databases of the certificate authorities yum should use to verify SSL certificates. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

sslclientcert

(Property: This attribute represents concrete state on the target system.)

Path to the SSL client certificate yum should use to connect to repositories/remote sites. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

sslclientkey

(Property: This attribute represents concrete state on the target system.)

Path to the SSL client key yum should use to connect to repositories/remote sites. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

sslverify

(Property: This attribute represents concrete state on the target system.)

Should yum verify SSL certificates/hosts at all. Valid values are: false/0/no or true/1/yes. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^(true|false|0|1|no|yes)$/.

(↑ Back to yumrepo attributes)

target

The target parameter will be enabled in a future release and should not be used.

(↑ Back to yumrepo attributes)

throttle

(Property: This attribute represents concrete state on the target system.)

Enable bandwidth throttling for downloads. This option can be expressed as a absolute data rate in bytes/sec or a percentage 60%. An SI prefix (k, M or G) may be appended to the data rate values. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^\d+[kMG%]?$/.

(↑ Back to yumrepo attributes)

timeout

(Property: This attribute represents concrete state on the target system.)

Number of seconds to wait for a connection before timing out. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /^\d+$/.

(↑ Back to yumrepo attributes)

username

(Property: This attribute represents concrete state on the target system.)

Username to use for basic authentication to a repo or really any url. Set this to absent to remove it from the file completely.

Valid values are absent. Values can match /.*/.

(↑ Back to yumrepo attributes)

Providers

inifile

Manage yum repo configurations by parsing yum INI configuration files.

Fetching instances

When fetching repo instances, directory entries in ‘/etc/yum/repos.d’, ‘/etc/yum.repos.d’, and the directory optionally specified by the reposdir key in ‘/etc/yum.conf’ will be checked. If a given directory does not exist it will be ignored. In addition, all sections in ‘/etc/yum.conf’ aside from ‘main’ will be created as sections.

Storing instances

When creating a new repository, a new section will be added in the first yum repo directory that exists. The custom directory specified by the ‘/etc/yum.conf’ reposdir property is checked first, followed by ‘/etc/yum/repos.d’, and then ‘/etc/yum.repos.d’. If none of these exist, the section will be created in ‘/etc/yum.conf’.

zfs

Description

Manage zfs. Create destroy and set properties on zfs instances.

Autorequires: If Puppet is managing the zpool at the root of this zfs instance, the zfs resource will autorequire it. If Puppet is managing any parent zfs instances, the zfs resource will autorequire them.

Attributes

zfs { 'resource title':
  name           => # (namevar) The full name for this filesystem (including the 
  ensure         => # The basic property that the resource should be...
  aclinherit     => # The aclinherit property. Valid values are...
  aclmode        => # The aclmode property. Valid values are...
  acltype        => # The acltype propery. Valid values are 'noacl...
  atime          => # The atime property. Valid values are `on`...
  canmount       => # The canmount property. Valid values are `on`...
  checksum       => # The checksum property. Valid values are `on`...
  compression    => # The compression property. Valid values are `on`, 
  copies         => # The copies property. Valid values are `1`, `2`...
  dedup          => # The dedup property. Valid values are `on`...
  devices        => # The devices property. Valid values are `on`...
  exec           => # The exec property. Valid values are `on`...
  logbias        => # The logbias property. Valid values are...
  mountpoint     => # The mountpoint property. Valid values are...
  nbmand         => # The nbmand property. Valid values are `on`...
  primarycache   => # The primarycache property. Valid values are...
  provider       => # The specific backend to use for this `zfs...
  quota          => # The quota property. Valid values are `<size>`...
  readonly       => # The readonly property. Valid values are `on`...
  recordsize     => # The recordsize property. Valid values are powers 
  refquota       => # The refquota property. Valid values are...
  refreservation => # The refreservation property. Valid values are...
  reservation    => # The reservation property. Valid values are...
  secondarycache => # The secondarycache property. Valid values are...
  setuid         => # The setuid property. Valid values are `on`...
  shareiscsi     => # The shareiscsi property. Valid values are `on`...
  sharenfs       => # The sharenfs property. Valid values are `on`...
  sharesmb       => # The sharesmb property. Valid values are `on`...
  snapdir        => # The snapdir property. Valid values are `hidden`, 
  version        => # The version property. Valid values are `1`, `2`, 
  volsize        => # The volsize property. Valid values are...
  vscan          => # The vscan property. Valid values are `on`...
  xattr          => # The xattr property. Valid values are `on`...
  zoned          => # The zoned property. Valid values are `on`...
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The full name for this filesystem (including the zpool).

(↑ Back to zfs attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to zfs attributes)

aclinherit

(Property: This attribute represents concrete state on the target system.)

The aclinherit property. Valid values are discard, noallow, restricted, passthrough, passthrough-x.

(↑ Back to zfs attributes)

aclmode

(Property: This attribute represents concrete state on the target system.)

The aclmode property. Valid values are discard, groupmask, passthrough.

(↑ Back to zfs attributes)

acltype

(Property: This attribute represents concrete state on the target system.)

The acltype propery. Valid values are ‘noacl’ and ‘posixacl’. Only supported on Linux.

(↑ Back to zfs attributes)

atime

(Property: This attribute represents concrete state on the target system.)

The atime property. Valid values are on, off.

(↑ Back to zfs attributes)

canmount

(Property: This attribute represents concrete state on the target system.)

The canmount property. Valid values are on, off, noauto.

(↑ Back to zfs attributes)

checksum

(Property: This attribute represents concrete state on the target system.)

The checksum property. Valid values are on, off, fletcher2, fletcher4, sha256.

(↑ Back to zfs attributes)

compression

(Property: This attribute represents concrete state on the target system.)

The compression property. Valid values are on, off, lzjb, gzip, gzip-[1-9], zle.

(↑ Back to zfs attributes)

copies

(Property: This attribute represents concrete state on the target system.)

The copies property. Valid values are 1, 2, 3.

(↑ Back to zfs attributes)

dedup

(Property: This attribute represents concrete state on the target system.)

The dedup property. Valid values are on, off.

(↑ Back to zfs attributes)

devices

(Property: This attribute represents concrete state on the target system.)

The devices property. Valid values are on, off.

(↑ Back to zfs attributes)

exec

(Property: This attribute represents concrete state on the target system.)

The exec property. Valid values are on, off.

(↑ Back to zfs attributes)

logbias

(Property: This attribute represents concrete state on the target system.)

The logbias property. Valid values are latency, throughput.

(↑ Back to zfs attributes)

mountpoint

(Property: This attribute represents concrete state on the target system.)

The mountpoint property. Valid values are <path>, legacy, none.

(↑ Back to zfs attributes)

nbmand

(Property: This attribute represents concrete state on the target system.)

The nbmand property. Valid values are on, off.

(↑ Back to zfs attributes)

primarycache

(Property: This attribute represents concrete state on the target system.)

The primarycache property. Valid values are all, none, metadata.

(↑ Back to zfs attributes)

provider

The specific backend to use for this zfs resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to zfs attributes)

quota

(Property: This attribute represents concrete state on the target system.)

The quota property. Valid values are <size>, none.

(↑ Back to zfs attributes)

readonly

(Property: This attribute represents concrete state on the target system.)

The readonly property. Valid values are on, off.

(↑ Back to zfs attributes)

recordsize

(Property: This attribute represents concrete state on the target system.)

The recordsize property. Valid values are powers of two between 512 and 128k.

(↑ Back to zfs attributes)

refquota

(Property: This attribute represents concrete state on the target system.)

The refquota property. Valid values are <size>, none.

(↑ Back to zfs attributes)

refreservation

(Property: This attribute represents concrete state on the target system.)

The refreservation property. Valid values are <size>, none.

(↑ Back to zfs attributes)

reservation

(Property: This attribute represents concrete state on the target system.)

The reservation property. Valid values are <size>, none.

(↑ Back to zfs attributes)

secondarycache

(Property: This attribute represents concrete state on the target system.)

The secondarycache property. Valid values are all, none, metadata.

(↑ Back to zfs attributes)

setuid

(Property: This attribute represents concrete state on the target system.)

The setuid property. Valid values are on, off.

(↑ Back to zfs attributes)

shareiscsi

(Property: This attribute represents concrete state on the target system.)

The shareiscsi property. Valid values are on, off, type=<type>.

(↑ Back to zfs attributes)

sharenfs

(Property: This attribute represents concrete state on the target system.)

The sharenfs property. Valid values are on, off, share(1M) options

(↑ Back to zfs attributes)

sharesmb

(Property: This attribute represents concrete state on the target system.)

The sharesmb property. Valid values are on, off, sharemgr(1M) options

(↑ Back to zfs attributes)

snapdir

(Property: This attribute represents concrete state on the target system.)

The snapdir property. Valid values are hidden, visible.

(↑ Back to zfs attributes)

version

(Property: This attribute represents concrete state on the target system.)

The version property. Valid values are 1, 2, 3, 4, current.

(↑ Back to zfs attributes)

volsize

(Property: This attribute represents concrete state on the target system.)

The volsize property. Valid values are <size>

(↑ Back to zfs attributes)

vscan

(Property: This attribute represents concrete state on the target system.)

The vscan property. Valid values are on, off.

(↑ Back to zfs attributes)

xattr

(Property: This attribute represents concrete state on the target system.)

The xattr property. Valid values are on, off.

(↑ Back to zfs attributes)

zoned

(Property: This attribute represents concrete state on the target system.)

The zoned property. Valid values are on, off.

(↑ Back to zfs attributes)

Providers

zfs

Provider for zfs.

  • Required binaries: zfs.

zone

Description

Manages Solaris zones.

Autorequires: If Puppet is managing the directory specified as the root of the zone’s filesystem (with the path attribute), the zone resource will autorequire that directory.

Attributes

zone { 'resource title':
  name         => # (namevar) The name of the...
  ensure       => # The running state of the zone.  The valid states 
  autoboot     => # Whether the zone should automatically boot....
  clone        => # Instead of installing the zone, clone it from...
  create_args  => # Arguments to the `zonecfg` create command.  This 
  dataset      => # The list of datasets delegated to the non-global 
  id           => # The numerical ID of the zone.  This number is...
  inherit      => # The list of directories that the zone inherits...
  install_args => # Arguments to the `zoneadm` install command....
  ip           => # The IP address of the zone.  IP addresses...
  iptype       => # The IP stack type of the zone.  Valid values are 
  path         => # The root of the zone's filesystem.  Must be a...
  pool         => # The resource pool for this...
  provider     => # The specific backend to use for this `zone...
  realhostname => # The actual hostname of the...
  shares       => # Number of FSS CPU shares allocated to the...
  sysidcfg     => # The text to go into the `sysidcfg` file when the 
  # ...plus any applicable metaparameters.
}

name

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name of the zone.

(↑ Back to zone attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The running state of the zone. The valid states directly reflect the states that zoneadm provides. The states are linear, in that a zone must be configured, then installed, and only then can be running. Note also that halt is currently used to stop zones.

Valid values are absent, configured, installed, running.

(↑ Back to zone attributes)

autoboot

(Property: This attribute represents concrete state on the target system.)

Whether the zone should automatically boot.

Valid values are true, false.

(↑ Back to zone attributes)

clone

Instead of installing the zone, clone it from another zone. If the zone root resides on a zfs file system, a snapshot will be used to create the clone; if it resides on a ufs filesystem, a copy of the zone will be used. The zone from which you clone must not be running.

(↑ Back to zone attributes)

create_args

Arguments to the zonecfg create command. This can be used to create branded zones.

(↑ Back to zone attributes)

dataset

(Property: This attribute represents concrete state on the target system.)

The list of datasets delegated to the non-global zone from the global zone. All datasets must be zfs filesystem names which are different from the mountpoint.

(↑ Back to zone attributes)

id

The numerical ID of the zone. This number is autogenerated and cannot be changed.

(↑ Back to zone attributes)

inherit

(Property: This attribute represents concrete state on the target system.)

The list of directories that the zone inherits from the global zone. All directories must be fully qualified.

(↑ Back to zone attributes)

install_args

Arguments to the zoneadm install command. This can be used to create branded zones.

(↑ Back to zone attributes)

ip

(Property: This attribute represents concrete state on the target system.)

The IP address of the zone. IP addresses must be specified with an interface, and may optionally be specified with a default router (sometimes called a defrouter). The interface, IP address, and default router should be separated by colons to form a complete IP address string. For example: bge0:192.168.178.200 would be a valid IP address string without a default router, and bge0:192.168.178.200:192.168.178.1 adds a default router to it.

For zones with multiple interfaces, the value of this attribute should be an array of IP address strings (each of which must include an interface and may include a default router).

(↑ Back to zone attributes)

iptype

(Property: This attribute represents concrete state on the target system.)

The IP stack type of the zone.

Valid values are shared, exclusive.

(↑ Back to zone attributes)

path

(Property: This attribute represents concrete state on the target system.)

The root of the zone’s filesystem. Must be a fully qualified file name. If you include %s in the path, then it will be replaced with the zone’s name. Currently, you cannot use Puppet to move a zone. Consequently this is a readonly property.

(↑ Back to zone attributes)

pool

(Property: This attribute represents concrete state on the target system.)

The resource pool for this zone.

(↑ Back to zone attributes)

provider

The specific backend to use for this zone resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to zone attributes)

realhostname

The actual hostname of the zone.

(↑ Back to zone attributes)

shares

(Property: This attribute represents concrete state on the target system.)

Number of FSS CPU shares allocated to the zone.

(↑ Back to zone attributes)

sysidcfg

The text to go into the sysidcfg file when the zone is first booted. The best way is to use a template:

# $confdir/modules/site/templates/sysidcfg.erb
system_locale=en_US
timezone=GMT
terminal=xterms
security_policy=NONE
root_password=<%= password %>
timeserver=localhost
name_service=DNS {domain_name=<%= domain %> name_server=<%= nameserver %>}
network_interface=primary {hostname=<%= realhostname %>
  ip_address=<%= ip %>
  netmask=<%= netmask %>
  protocol_ipv6=no
  default_route=<%= defaultroute %>}
nfs4_domain=dynamic

And then call that:

zone { 'myzone':
  ip           => 'bge0:192.168.0.23',
  sysidcfg     => template('site/sysidcfg.erb'),
  path         => '/opt/zones/myzone',
  realhostname => 'fully.qualified.domain.name',
}

The sysidcfg only matters on the first booting of the zone, so Puppet only checks for it at that time.

(↑ Back to zone attributes)

Providers

solaris

Provider for Solaris Zones.

  • Required binaries: /usr/sbin/zoneadm, /usr/sbin/zonecfg.
  • Default for osfamily == solaris.

zpool

Description

Manage zpools. Create and delete zpools. The provider WILL NOT SYNC, only report differences.

Supports vdevs with mirrors, raidz, logs and spares.

Attributes

zpool { 'resource title':
  pool        => # (namevar) The name for this...
  ensure      => # The basic property that the resource should be...
  disk        => # The disk(s) for this pool. Can be an array or a...
  log         => # Log disks for this pool. This type does not...
  mirror      => # List of all the devices to mirror for this pool. 
  provider    => # The specific backend to use for this `zpool...
  raid_parity => # Determines parity when using the `raidz...
  raidz       => # List of all the devices to raid for this pool...
  spare       => # Spare disk(s) for this...
  # ...plus any applicable metaparameters.
}

pool

(Namevar: If omitted, this attribute’s value defaults to the resource’s title.)

The name for this pool.

(↑ Back to zpool attributes)

ensure

(Property: This attribute represents concrete state on the target system.)

The basic property that the resource should be in.

Valid values are present, absent.

(↑ Back to zpool attributes)

disk

(Property: This attribute represents concrete state on the target system.)

The disk(s) for this pool. Can be an array or a space separated string.

(↑ Back to zpool attributes)

log

(Property: This attribute represents concrete state on the target system.)

Log disks for this pool. This type does not currently support mirroring of log disks.

(↑ Back to zpool attributes)

mirror

(Property: This attribute represents concrete state on the target system.)

List of all the devices to mirror for this pool. Each mirror should be a space separated string:

mirror => ["disk1 disk2", "disk3 disk4"],

(↑ Back to zpool attributes)

provider

The specific backend to use for this zpool resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

Available providers are:

(↑ Back to zpool attributes)

raid_parity

Determines parity when using the raidz parameter.

(↑ Back to zpool attributes)

raidz

(Property: This attribute represents concrete state on the target system.)

List of all the devices to raid for this pool. Should be an array of space separated strings:

raidz => ["disk1 disk2", "disk3 disk4"],

(↑ Back to zpool attributes)

spare

(Property: This attribute represents concrete state on the target system.)

Spare disk(s) for this pool.

(↑ Back to zpool attributes)

Providers

zpool

Provider for zpool.

  • Required binaries: zpool.

NOTE: This page was generated from the Puppet source code on 2018-08-28 06:47:28 -0700