I may not understand your problem fully, but I do something similar in one
of my base classes as I had a similar HP software dependency:
case $operatingsystem {
centos: {
case $operatingsystemrelease {
5.0,5.1,5.2,5.3,5.4,5.5,5.6,5.7,5.8,5.9: { include rhel5,
rhel5-absent }
6.0,6.1,6.2,6.3,6.4,6.5,6.6,6.7,6.8,6.9: { include rhel6,
rhel6-absent }
}
}
redhat: {
case $operatingsystemrelease {
5.0,5.1,5.2,5.3,5.4,5.5,5.6,5.7,5.8,5.9: { include rhel5,
rhel5-absent }
6.0,6.1,6.2,6.3,6.4,6.5,6.6,6.7,6.8,6.9: { include rhel6,
rhel6-absent }
}
}
}
Then in rhel6.pp
class rhel6 {
package {
["at",
"compat-libstdc++-296",
"compat-libstdc++-33",
"compat-libstdc++-33.i686",]:
ensure => present,
provider => yum,}
In rhel5.pp
class rhel5 {
package {
["alchemist",
"anacron",
"at",
"compat-libstdc++-296",
"compat-libstdc++-33",
"compat-libstdc++-33.i386",]:
ensure => present,
provider => yum,}
My Puppet-foo could use some work, but you can see the logic I employ.
Brian
On Monday, February 27, 2012 11:44:00 AM UTC-6, Alan Laird wrote:
>
> On Feb 24, 5:52 am, jcbollinger <[email protected]> wrote:
> > On Feb 23, 4:57 pm, AlanLaird<[email protected]> wrote:
> >
> > > Any suggestions on the right way to do this?
> >
> > If neither of the things you already tried works, then perhaps you
> > should fall back to "don't worry about it." If you install software
> > only from packages, then, since you're usign the yum provider,
> > installing any other package that needs libstdc++.i386 will cause
> > libstdc++.i386 to be installed too. And installing only from packages
> > is an excellent practice, even if it means you sometimes have to roll
> > your own packages and maintain a local package repository (neither is
> > hard).
> >
> > Personally, I am inclined to lean heavily on my package manager. I
> > think it's more robust and maintainable to have Puppet manage only my
> > direct package requirements.
>
> This is a third-party package with poorly constructed depends in a
> mixed 32 and 64 bit environment as I support moving from Centos5 to
> Centos6. Repackaging the vendor package is easy but it would need to
> be done at each release.
>
> I've solved the problem of the day by installing the needed libstdc+
> +34-3.4.0-1.i386 specifically but it's a clunky way to deal with this
> issue.
>
> I would love to find a crafty puppet way to do this.
>
> Alan
>
>
--
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/-/fyW1usT6TQIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.