Our site has several dozen yum repositories. Pushing all yum repositories to
all servers isn't practical; it hurts performance, some repositories are
OS-specific, and some repositories cause conflicts with each other (we have a
ruby187 repo and a ruby 193 repo, for example).
In our current setup, we have one module with all our yumrepos defined
virtually:
class yumrepos {
@yumrepo{'puppet':
…
}
@yumrepo{'python26':
…
}
…
}
And our various modules realize those resources as needed:
class puppet(...) {
realize Yumrepo['puppet']
…
}
However, this requires every package definition to require the Yumrepo
resource. I can ease the pain with resource defaults, but it doesn't go away
completely. I have found on puppet 2.7 that virtual resources are evaluated in
the run stage they are defined in, not the run stage they are realized in, so
that I can do in site.pp:
stage{'package-setup': before => Stage['main'] }
class{'yumrepos': stage => 'package-setup' }
Then all yum repositories that a node will use are on the machine before any
packages are installed. Is this a kosher use of run stages? Am I going to be
surprised by something I didn't consider? I have only tested this behavior in
Puppet 2.7 and don't know if it is subject to change in later releases. How do
others handle this problem?
-David
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CC9908D1-77D9-44C0-A118-B76430A12B25%40aqwari.net.
For more options, visit https://groups.google.com/groups/opt_out.