30 define nagios-template-enable() {
31 notify{"Installing the config file now": }
32
33 file { "/etc/nagios/$name.cfg":
34 owner => 'root',
35 group => 'root',
36 mode => 644,
37 notify => 'upating config',
38 content => template('nrpe/nrpe.cfg.erb'),
39 }
40 }
41 nagios-template-enable { 'nrpe.cfg': }
42
43 service { 'nagios':
44 ensure => running,
45 enable => true,
46 subscribe => [
47 Package['nagios-nrpe-plugin'],
48 File['/etc/nagios/nrpe.cfg']],
49 }
-----
info: Loading fact afproduct
info: Loading fact ec2
info: Loading fact afemail
info: Loading fact afrole
notice: Ignoring --listen on onetime run
info: Loading fact afproduct
info: Loading fact ec2
info: Loading fact afemail
info: Loading fact afrole
err: Could not create /etc/nagios/nrpe.cfg.cfg: Parameter notify failed: Relationships must be resource references at /etc/puppet/modules/nrpe/manifests/init.pp:39
warning: Not using cache on failed catalog
warning: Configuration could not be instantiated: Parameter notify failed: Relationships must be resource references at /etc/puppet/modules/nrpe/manifests/init.pp:39