On Thursday, January 24, 2013 12:11:45 PM UTC-6, Ellison Marks wrote: > > Just my two cents here. I've had some major problems in the past with > using puppet to manage a file installed by a package which is also managed > by puppet. Now, I haven't revisited the problem since 2.6, but my intuition > was that since the file to be managed didn't exist at the start of the run, > puppet got confused and flubbed the dependencies. My "solution" was to > handle installing repos when I install the machine, as part of the > kickstart. > > How odd. It's pretty routine to manage, for example, the package, config file, and status of a service with Puppet. There must be thousands of manifests exhibiting this general pattern:
class foo { package { 'foo': ensure => installed } # Manages a file provided by Package['foo']: file { '/etc/foo.conf': require => Package[foo], content => template('foo.conf.erb') } # Tweaks a file touched by Package['foo']'s install # script: service { 'foo': enable => true, ensure => 'running', subscribe => [ Package['foo'], File['/etc/foo.conf'] ] } } And it works, provided that there are no cycles in the relationship graph. Whether the physical resources to be managed exist at the beginning of a run are immaterial to Puppet. Resource application order is a matter of resource definitions in the catalog; the physical resources to which they correspond do not factor in to ordering. In at least some versions of Puppet, the agent handles relationship cycles by choosing a relationship to ignore, thus breaking the cycle. It may be that the OP is seeing that behavior. I am anyway inclined to suspect that there is more to the picture. Matthew's suggestion to have Puppet generate the relationship graph is a good one. Also, with respect to providers: Puppet chooses default providers on a per-resource-type basis, without regard to the parameters of any given resource instance. So, if you want to use the 'rpm' Package provider on a yum-based system, then you will need to use the 'provider' parameter to tell Puppet so. 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/-/W91EUNv3lYEJ. 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.