I've been looking at this example in the puppetdocs.pdf

class nagios-target {
@@nagios_host { $fqdn:
ensure => present,
alias => $hostname,
address => $ipaddress,
use => "generic-host",
}

@@nagios_service { "check_ping_${hostname}":
check_command => "check_ping!100.0,20%!500.0,60%",
use => "generic-service",
host_name => "$fqdn",
notification_period => "24x7",
service_description => "${hostname}_check_ping"
}

}
class nagios-monitor {
package { [ nagios, nagios-plugins ]: ensure => installed, }
service { nagios:
ensure => running,
enable => true,
#subscribe => File[$nagios_cfgdir],
require => Package[nagios],
}

# collect resources and populate /etc/nagios/nagios_*.cfg
Nagios_host <<||>>
Nagios_service <<||>>

How is /etc/nagios/nagios_*.cfg populated using these two exported resources?

A more general question is that I'm confused on the purpose of exported 
resources. One of the other examples in the puppetdocs.pdf is

node a {
@@file { "/tmp/foo": content => "fjskfjs\n", tag => "foofile", }
}

node b {
File <<| tag == 'foofile' |>>
}

In this case, wouldn't you be better off creating the '/tmp/foo' resource and 
placing or including it in your default node or whichever node you want to 
apply it to?

--Luke Baker

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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