Ask Your Question

how to notify service in a different module

asked 2014-12-10 20:24:16 -0600

Luke8 gravatar image

I have two modules, syslog and a monitoring module. The monitoring application adds an entry into /etc/syslog.conf and requires syslog to be restart whenever it gets restarted. How do I code this in puppet without crossing module boundries?

So in puppet-psuedo code:


I manage the second step using a defined type.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-12-11 18:53:31 -0600

GregLarkin gravatar image

Does syslog have to be restarted whenever the monitor service restarts or only when /etc/syslog.conf is modified? I would expect it to be the latter, and if that's the case, then you can simplify your code to:

File[monitor_config.conf] ~> Service[monitor]
File_line[monitor_syslog_entry] ~> Service[syslog]

Also, why do you want to avoid crossing module boundaries? There shouldn't be any problem doing that.

edit flag offensive delete link more


No - it is the former. I was under the impression that if you have two resources in different modules, having one depend on the other was a bad thing.

Luke8 gravatar imageLuke8 ( 2014-12-15 19:34:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-12-10 20:24:16 -0600

Seen: 509 times

Last updated: Dec 11 '14