First page Back Continue Last page Overview Graphics
A More Useful Class
class bacula-client {
package { "bacula-client": ensure => present; }
service { "bacula-fd":
ensure => running,
enable => true,
}
file {"/etc/bacula/bacula-fd.conf":
mode => "644",
owner => "root",
group => "root",
ensure => present,
content => template("bacula/bacula-fd.conf"),
}
}
Notes:
This class now makes sure that the package named "bacula-client" is
installed, the service called "bacula-fd" is running and will restart
on boot (enabled). Also, the file "/etc/bacula/bacula-fd.conf" is
there, and its contents are taken from that template. We will get to
templates in a minute.