----- Original Message ----- > On 04/29/2011 10:53 AM, jcbollinger wrote: > > > > On the conceptual level, what does it or *should* it mean that a > > node > > has Class['proxy']? To you it seems to mean that the node > > positively > > uses an HTTP proxy, at least for Apt. But it could instead mean > > that > > the node's proxy configuration is managed, which might include > > ensuring that it doesn't use a proxy. > > > > This is an excellent starting point. Let's just focus > on this assertion: "The proxy configuration is managed". > > And let us add that, if the proxy config is wrong, packages may > not get installed on a node (for one puppet run anyway). > > The most likely downside is that a puppet run will partially fail > because the proxy gets configured somewhere in the middle of the run. > But, on the next run, things work ok, so not a showstopper. > > And, let's forget for the moment that there or non-puppet solutions. > > And, I will leave out any example implementation, so there is nothing > to > pick at there. > > But any solution in puppet should, as you point out, either establish > or remove a proxy, depending on something. Maybe a choice of > apt::proxy or apt::noproxy, or maybe some parameter or variable > value. > > But by its nature the proxy config is something we would like to have > happen first. > > Can this be expressed in puppet as a drop in? Can I design a module > that manages the proxy, such that when I add that module to an > existing > design, I don't have to visit every module and add a require in order > to control the order of things? > > It appears that I cannot.
Sounds like you want resource chaining[1], you can resource chaining to affect the order of lots of other resources/classes. So: class aptproxy { # set up the proxy Class["aptproxy"] -> Package <| provider == apt |> } now if you include the proxy class it will adjust the relationships on packages using apt else those packages wont have the relationship at all. careful though this has an unfortunate side effect that it will also realize all virtual packages with the provider apt onto a node. point is you *can* tweak dependencies as a result of including a class. [1] http://docs.puppetlabs.com/guides/language_guide.html#chaining-resources -- R.I.Pienaar -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.