With in the class I used something like this to get the facts into my
nagios templates:
define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup =
$::product_info, $product_domain = $::product_domain) {
case $product_info {
/OneProduct/: {
$nagios_cfgdir = "/usr/local/nagios/etc/objects/OneProduct/hosts"
@@file {
"$nagios_cfgdir/${name}.cfg":
ignore => ".svn",
ensure => present,
content => template( "nagios/OneProduct_host.cfg" ),
mode => 644,
owner => nagios,
group => nagios,
tag => 'nagios',
notify => Service[nagios],
}
}
/YetAnotherProduct/: {
$nagios_cfgdir =
"/usr/local/nagios/etc/objects/YetAnotherProduct/hosts"
@@file {
"$nagios_cfgdir/${name}.cfg":
ignore => ".svn",
ensure => present,
content => template( "nagios/YetAnotherProduct_host.cfg" ),
mode => 644,
owner => nagios,
group => nagios,
tag => 'nagios',
notify => Service[nagios],
recurse => true,
replace => true,
}
I hope this helps;)
On Wed, Jun 20, 2012 at 1:57 PM, Jeff McCune <[email protected]> wrote:
> On Wed, Jun 20, 2012 at 1:22 PM, Jakov Sosic <[email protected]> wrote:
>
>> > I'm puzzled as to why can't I just use $operatingsystemrelease, and what
>> > do these two semicolons mean?
>>
>>
>> Any ideas?! :) Anyone?!?!
>
>
> http://docs.puppetlabs.com/guides/scope_and_puppet.html
>
> -Jeff
>
> --
> 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.
>
--
David Garvey
--
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.