Package Resource :

Manages software packages. Some platforms have better package tools than others, so you’ll have to do some research on yours;

Example of Package Resource :

package { 'httpd':
ensure => present,
}

Package Attributes:

ensure — The state for this package.

present

latest

{any version string}

absent

purged (Potentially dangerous. Ensures absent, then zaps configuration files and dependencies, including those that other

packages depend on. Providerdependent.)

name — The name of the package, as known to your packaging system; defaults to title.

source — Where to obtain the package, if your system’s packaging tools don’t use a repository.

Service Resource:

Manages services running on the node. Like with packages, some platforms have better tools than others, so read up. To restart a service whenever a file changes, subscribe to the file or have the file notify the service. (subscribe => File[‘sshd _ config’] or notify => Service[‘sshd’]).