Puppet Class: pcp::install

Defined in:
manifests/install.pp

Overview



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'manifests/install.pp', line 2

class pcp::install {
  if $pcp::_package_ensure != 'absent' {
    ensure_packages($pcp::packages, { 'ensure' => $pcp::_package_ensure })
  } else {
    $pcp::packages.each |$package| {
      exec { "remove ${package}":
        path      => '/usr/bin:/bin:/usr/sbin:/sbin',
        command   => "yum -y remove ${package}",
        onlyif    => "rpm -q ${package}",
        logoutput => true,
      }
    }
  }

  ensure_packages($pcp::extra_packages, { 'ensure' => $pcp::_package_ensure })
}