Example of the manifest.pp:
$ cat puppet/manifests/default.pp
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] }
class system-update {
exec { 'apt-get update':
command => 'apt-get update',
}
$sysPackages = [ "build-essential" ]
package { $sysPackages:
ensure => "installed",
require => Exec['apt-get update'],
}
}
class apache {
package { "apache2":
ensure => present,
require => Class["system-update"],
}
service { "apache2":
ensure => "running",
require => Package["apache2"],
}
}
class iotop {
package { "iotop":
ensure => present,
require => Class["system-update"],
}
}
include apache
include system-update
include iotop
No comments:
Post a Comment