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/-/QxI8Unu9HEoJ.
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.

Reply via email to