On Thu, Sep 22, 2011 at 06:05:33AM -0700, Chris wrote:
> 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?

Sorry for the useless post, but: I'd love to hear how to do this
too!

I suspect that
http://www.devco.net/archives/2011/06/06/puppet_backend_for_hiera.php
(suggested in another thread) could handle it, but is there a native
way?

-Robin

-- 
http://singinst.org/ :  Our last, best hope for a fantastic future.
Lojban (http://www.lojban.org/): The language in which "this parrot
is dead" is "ti poi spitaki cu morsi", but "this sentence is false"
is "na nei".   My personal page: http://www.digitalkingdom.org/rlp/

-- 
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