Ask Your Question
0

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

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

Ars gravatar image

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

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
1

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

lavaman gravatar image

This functionality appears to be forthcoming:

http://projects.puppetlabs.com/issues/651

edit flag offensive delete link more
0

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

Waldemar gravatar image

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

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
   NotifyReboot':   
   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

Stats

Asked: 2013-07-21 14:48:40 -0500

Seen: 186 times

Last updated: Jul 23 '13