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.
On Thursday, January 24, 2013 6:49:25 AM UTC-8, jg4...@bristol.ac.uk wrote: > > Hi all, > > I'm a reasonably experienced puppet user but I'm running into a problem > with yumrepos where 'before' and 'require' don't seem to be behaving how I > expect. > > class repos::atomic { > package { 'atomic-release': > ensure => installed, > source => ' > http://www6.atomicorp.com/channels/source/atomic-release/atomic-release-1.0-15.el6.art.noarch.rpm', > > > before => Yumrepo['atomic'], > } > > # After installing the repo, tweak it to limit it to ossec* packages > yumrepo { 'atomic': > name => 'atomic', > includepkgs => 'ossec-hids*', > require => Package['atomic-release'], > } > } > > In theory, this chunk of code installs the atomic-release RPM package, > which sets up /etc/yum.repos.d/atomic.repo and handles the GPG key. Then, > my Yumrepo block runs and modifies atomic.repo to add the includepkgs > line.l > > If the RPM is installed before the Yumrepo, then this works. However, > quite often it seems the Yumrepo block is run first, creating an > atomic.repo file with nothing other than the includepkgs line, and then the > RPM is installed, which notices that atomic.repo exists and creates > atomic.repo.rpmnew - leaving me with a broken yum configuration. > > This occurs even with the before => Yumrepo['atomic'] and require = > > Package['atomic-release'] lines in place, which is not what I expect. Am I > missing a subtlety? > > Cheers, > Jonathan > -- 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/-/W7lhnoQOmOwJ. 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.