Hi,

Is it possible to use facts from external nodes via stored configs, based
on a filter such as class? To illustrate, I provide the following use case ;


class nagios::nrpe {
  # No such resource "ip". I'd like to use "ip" fact of any node that is
assigned to class "nagios::server"
  $nagios_servers = Ip <<| class="nagios::server" |>>

  # Construct firewall rule from template using knowledge of external hosts.
  ipt_fragment { "090nrpe_filter":
    table => "filter",
    content => template("nagios/nrpe.cfg.erb"),
  }

}

templates/nrpe.cfg.erb:
...
allowed_hosts=<%= nagios_servers.join(',') %>
...

I'm currently storing this type of data (nagios_servers) in CSV & using
extlookup, but it seems to me that we should already know this information
if we're using stored configs.


Thanks,
Grant

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

Reply via email to