First page Back Continue Last page Overview Graphics
Inheritance
Puppet types can inherit from similar types and override if needed:
class bacula-client {
package { "bacula-client": ensure => present; }
service { "bacula-fd": ensure => running, enable => true, }
file {"/etc/bacula/bacula-fd.conf":
mode => "644",
content => template("bacula/bacula-fd.conf"),
}
}
class bacula-special inherits bacula-client {
File[“/etc/bacula/bacula-fd.conf”] {
content => template("bacula/bacula-fd.conf-special"),
}
}
A node that includes bacula-special will also have the package installed and the service running, but /etc/bacula/bacula-fd.conf will be taken from the second template.