Вы находитесь на странице: 1из 4

THE PUPPET LANGUAGE

L E A R N I N G R E S O U RC E S
RESOURCES

Resources are the fundamental unit for modeling


system configurations. Each resource describes
some aspect of a system, like a specific service or
package.

A Resource Declaration is an expression that


describes the desired state for a resource and tells
Puppet to add it to the catalog. When Puppet
applies that catalog to target system, it manages
every resource it contains, ensuring that the actual
state matches the desired state.
RESOURCES, CONT.

Resource Types
Every resource is associated with a resource type.
Below are some of the built-in resource types:
1. Files
2. Cron jobs
3. Services
4. Host
5. User
6. Notify, etc.
RESOURCES, CONT.

Resource Declaration
Every resource has a resource type, a title, and a set of
attributes.
Syntax: <TYPE> {<TITLE>:
<ATTRIBUTE> => <VALUE>,
}
Example:
file { /etc/passwd:
ensure => file,
owner => root,
group => root,
mode => 0600,
}

Вам также может понравиться