Hi all

I have been pondering this for a while, but not yet seen a clean way
to do it

I have a few puppet classes (apache/ntp/mysql/bacula/nagios/etc)

I would like to generate part of my bacula and nagios configs for each
host based on which other classes that host belongs to (or to put it
another way, I would like to export variables from classes which would
be used by my bacula and nagios classes).

As an example, my bacula template for a client currently has:

FileSet {
   Name = "FileSet-<%= hostname %>"
   Include {
    Options {
      signature = MD5
      compression = GZIP
    }
<% backup_include.split(/, */).each do |file| -%>    File = <%= file
%>
<% end -%>
# INC = <%= backup_include  %>
   }
   Exclude {
      File = /sys
      File = /proc
      File = /var/tmp
<% backup_exclude.split(/, */).each do |file| -%>       File = <%=
file %>
<% end -%>
   }
}


I would like the backup_include to automatically include /var/www if
the host is an apache server (for example), and I would like those
directories to be defined in the apache class (not the bacula class)

Any clever ways of achieving this?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to