Re: [Puppet Users] dependencies

Michael DeHaan
Thu, 18 Mar 2010 15:45:35 -0000

> We set a resource default at the top level of our manifests like this:
>
> Package { require => Class["package::apt::update"] }

Beat me to it :)

>
> and that class manages it''s own internal dependencies so that
before
> any package is installed, we''re guaranteed to have run:
>
> apt-get update
> apt-get -f install
> dpkg --configure -a
> apt-get dist-upgrade
>
> Then when it comes to setting up repositories, we do them all with
> File types in a certain hierarchy, so we set a default at that level
> of:
>
> File { owner => "root", group => "root", mode
=> 0644, before =>
> Class["package::apt::update"] }
>
> so we know that when putting down any new repositories, they will
> occur before the apt updating class does, and any package installation
> will occur after that.
>
>
>
>
>> -Chris
>>
>> On Thu, Mar 18, 2010 at 10:14 AM, Michael DeHaan
<michael@reductivelabs.com>
>> wrote:
>>>
>>> On Thu, Mar 18, 2010 at 10:03 AM, Christopher Johnston
>>> <chjohnst@gmail.com> wrote:
>>> > 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.
>>>
>>> Well, if the packages *do* have proper dependencies, installing one
>>> will install the dependencies.  I would hope there''s no
hoping on
>>> that, though it may be you have packages that don''t have
good
>>> dependencies yet.   In that case, fix the packages and that problem
>>> goes away :)
>>>
>>>
>>> > 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.
>>>
>>> Modelling it as a "yum module" seems a little weird to me
(though I
>>> can see where it would save typing in fairly homogenous
environments),
>>> I''d think it might work better if you keep the package
requirements
>>> inside the modules that need them.   That is to say, if you have an
>>> NTP class/module, require the packages needed for NTP there?
>>>
>>> --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.
>>> For more options, visit this group at
>>> http://groups.google.com/group/puppet-users?hl=en.
>>>
>>
>> --
>> 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.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> --
> nigel
>
> --
> 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.
> For more options, visit this group at