Ask Your Question
0

how to notify service in a different module

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

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:

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

I manage the second step using a defined type.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Comments

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 -0500 )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

Stats

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

Seen: 375 times

Last updated: Dec 11 '14