On Tuesday, November 19, 2013 2:40:54 AM UTC-6, [email protected] wrote: > > Hi! > I need to create manifest that creates file and run some command on it's > change. I thought that I can do it with subscribe and notify statements, > but I can't. Can someone give me example of such manifest? > I tried using manifest like this, and it always displays notify message, > despite > the fact that file has not changed > file { '/tmp/test': > ensure => present, > content => "Hello", > } > notify {'after': > message => "File created", > subscribe => File['/tmp/test/'], > } > File['/tmp/test'] ~> Notify['after'] > >
Only a few resource types, not including Notify, actually do anything in response to events received from modified resources, and that is above and beyond their ordinary synchronization behavior. Of those, only Exec (that I am aware of) has a mechanism for altogether suppressing its ordinary sync behavior. Other than for Execs, you cannot condition whether a resource is synced on whether another resource is transitioned from out-of-sync to synchronized. John -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/cfa91ba7-7a40-46df-91f8-60deee766b58%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
