On Tue, Feb 18, 2014 at 04:25:43AM -0800, zerozerouno...@gmail.com wrote: > On Tuesday, February 18, 2014 1:11:15 PM UTC+1, nikolavp wrote: > > > > 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'] > > } > > > Uhm, I expected the notify parameter to create a File ~> Service > dependency, and so a Class['B'] -> Class ['A'] dependency which would > create a loop with the other one, according to > http://docs.puppetlabs.com/references/latest/metaparameter.html#notify : > "[…notify…] it creates a dependency relationship like before".
Hmm (shame) good point. Haven't tried the code. In that case I would move the service(thingy) in a separate module with a define for a config file with proper relationships there. Then A and B will both have dependencies on that module and it(the new module) will handle the order and dependencies. I find this pattern far cleaner and when you think about it services are just separate things so giving each of them a module makes sense. -- Nikola > > Does it work instead? Maybe I should just try it. But time's up for today. > > Thanks. > Marco > > -- > 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/8ee53a6d-539b-4a2d-b023-a49ccd3c4961%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- 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/20140218124734.GE5244%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.