On Wednesday, September 5, 2012 3:47:04 AM UTC-5, Axel Bock wrote: > > Hi readers, > > I had this idea. I am deploying a configuration file of a service with > puppet, and I want to restart the service if the file changes. > > so I had this idea that the file definition contains a require=> and a > notify=> for the service. > that does not work, because Puppet does assume cyclic dependencies then. > > And I have no clue whatsoever why. both statements go from file to service > (or from service to file, however you like to put it), but I really don't > see a cyclic dependency here. >
I see that RIP gave you something you can use, but it's not clear whether you figured out your underlying misunderstanding about relationships. In particular, you seem to have been missing the point that relationships are directional, or perhaps you mistook the direction of the 'notify' relationship. The 'notify' relationships have directionality as 'before' relationships, opposite to that of 'require', and in fact 'notify' is best viewed as a specialization of 'before'. That is why you had a cycle. Moreover, no resource ever needs to declare more than one type of relationship with the same other resource. 'notify' is a specialization of 'before', so you don't need both or those, 'subscribe' is a specialization of 'require', so you don't need both of those, and all the other mixed pairs represent cycles. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/rj32woVGkmAJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.