Re: [Puppet Users] dependencies

Christopher Johnston
Thu, 18 Mar 2010 14:03:21 -0000

Being able to install yum groups would be a nice value add.  Sucks having to
list out 8-9 packages and hope rpm/yum deps get sorted out.  But what I am
really griping about though is something like this.

Say you have 2 modules, one called ntpd and one called snmpd.  Two totally
different types of configurations because not every system might get ntpd
configured (only my DNS servers do).  In each of my manifests they have to
install packages, but both modules have a direct dependency on my yum module
to have been run and successfully setup in order to get packages from the
right repo.  It gets a little out of control to have to remember to put a
require for the yum module every time I call a package type.

The only potential work around I can think of is to create a define that
puts the require in place..

define install::pkg($ensure) {
  package { $pkg:
    ensure => $ensure,
    require => Class["yum"]
  }
}


On Thu, Mar 18, 2010 at 9:46 AM, Michael DeHaan
<michael@reductivelabs.com>wrote:

> On Wed, Mar 17, 2010 at 7:35 PM, Christopher Johnston
> <chjohnst@gmail.com> wrote:
> > I guess my only gripe here is I have about 2 dozen modules most of
> install
> > some form of a pkg from yum.  So they all have a direct dependency on
my
> yum
> > module to do the right thing.  I would hate to have to put a require
in
> > every single instance that I call the method to install a pkg.  Any
ideas
> on
> > on how to simplify this to ensure yum is the very first thing that
gets
> > configured on my system?
> >                require => [ Class["yum"],
> >
>
> What if we taught the yum provider to know about "yum
groupinstall" ?
>
> That way you could add packages into comps.xml and reference them
> together, which would also be faster than referencing each one by one.
>
> While it would not technically be a ''package'' this might
be also a
> decent workaround solution to the ''yum transactions are not
batched''
> problem.
>
> package {   "stuff"
>     ensure => latest,
>     is_group => true,
>     ...
> }
>
> Thoughts?
>
> --Michael
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
>
puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.