Ask Your Question

How can I print a notice only on a file change?

asked 2013-07-21 14:48:40 -0600

Ars gravatar image

updated 2013-07-21 14:50:03 -0600

I have a file which, when changed, requires a reboot. I don't want to reboot immediately, but I do want to print a big notice that a reboot is required. Is there a way to set up a notify that only displays when a file changes?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2013-07-22 17:00:55 -0600

lavaman gravatar image

This functionality appears to be forthcoming:

edit flag offensive delete link more

answered 2013-07-23 05:59:32 -0600

Waldemar gravatar image

updated 2013-07-23 06:02:30 -0600

Assumptions (Your question seems to me quiet imprecise):

  • Your file is under puppet control
  • You want a notification on your puppet client
  • You already installed a notification mechanism on your puppet client.

Should work this way:

File {'A':} 

exec {'Exec
   subscribe => 'A',  
   refreshonly => 'true',}

The exec-Resource(Notification) is executed on the puppet-client. Please keep in mind, the command must quit immediately otherwise puppet can't finish.

edit flag offensive delete link more

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: 2013-07-21 14:48:40 -0600

Seen: 275 times

Last updated: Jul 23 '13