Access service defined in another class

asked 2015-02-18 16:17:11 -0600

lee_connell gravatar image

updated 2015-02-19 12:15:38 -0600

ramindk gravatar image

I am having a hard time understanding how to access a service defined in another class.

I have a module dep_base that has a service 'nrpe' defined. Now I also have a module called dep_mon that wants to notify dep_base::service['nrpe'] when a config file changes.

file { "file.cfg":
  notify => Service['nrpe'] 

Puppet will complain and say that the nrpe service is not defined. How do I tell monitoring_dep that the nrpe service is defined in dep_base?

edit retag flag offensive close merge delete



Please post the source code for the service declaration, and that will help with troubleshooting.

GregLarkin gravatar imageGregLarkin ( 2015-02-19 10:57:42 -0600 )edit

file { 'file.cfg':
  notify => Dep_base::Service['nrpe'],

Kai Burghardt gravatar imageKai Burghardt ( 2015-04-05 06:45:59 -0600 )edit