Hi Marco, On Mon, Feb 17, 2014 at 03:41:14AM -0800, zerozerouno...@gmail.com wrote: > Hi, > I have this situation: > > Class A: contains a File resource, and a Service resource which requires > the File resource (the service needs to be restarted when the file changes). > > Class B: will be applied only on a subset of machines where class A is > applied, and it requires class A - resources belonging to class B must be > applied only after resources from class A have been applied. Class B also > contains some File resources, and after they are applied also the _same_ > service from class A needs to be restarted.
class A { service {'myservice': ensure => 'started', } file { '/etc/default/myservice.conf': ensure => present, notify => Service['myservice'], template => '...', } } class B { file { '/etc/default/myservice.conf1': notify => Service['myservice'], # note that this is sort of global template => '...', } Class['A'] -> Class['B'] } > > How do you deal with this situation? > > I cannot declare the same Service resource again in class B. > And I cannot declare the Service in class A as dependent from the File in > class B. Why do you need this? You can just use the name of the service which will be sort of global to the catalog. > > Thanks for any suggestions. > Marco Sorry If I am missing something... -- Nikola -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140218121115.GD5244%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.