On Aug 4, 2011, at 12:33 PM, jcbollinger wrote: > > On Aug 3, 5:34 pm, Craig White <craig.wh...@ttiltd.com> wrote: >> sure - that's what Ohad suggested and it's somewhat workable. The issue >> really is that this is a hack workaround. For example, the interface for >> configuring the environment in foreman allows you to select it but it >> doesn't change a thing on the client. So there's a disconnect when you >> define the environment in an ENC - the client simply ignores it. > > > It seems agreed on all sides that Puppet has a longstanding weakness > in how the master determines from which environment to serve catalogs > and files to clients. It is true that to use environments > successfully, you need to work around those issues. > > >> I would find a 'next time' implementation to be perfect and much better than >> the deafness that it currently has. > > > I think you may be missing the point there, however. I am not > proposing an alternative implementation of what Puppet already has, > and to which Foreman (I suppose) provides access out-of-the-box. > Rather, I am observing that by using the 'environment' variable in > your puppet.conf template, you are ascribing the wrong meaning to it. > > The existing definition of that variable (i.e. the node's 'this time' > environment) is good and useful -- it's just not what you want for the > job at hand. You need something separate for this job, so I suggested > you set up a *new* variable with which to define nodes' 'next time' > environments. > > I don't use Foreman, so I'm not sure what would be involved on that > front, but I would imagine that it's not very difficult. On the other > hand, I personally wouldn't use Foreman for this at all, inasmuch as > doing so seems to imply that I would need to manually set the desired > 'next time' environment, on a per-node basis, via the Foreman GUI. > Instead, I would create a class that gets included in every > environment, in which a variable defining the 'next time' environment > is set based on the 'this time' environment. Your template would be > filled from that variable instead of from the global variable > 'environment'. ---- OK - I gather what I would have to do is hack Foreman so that it says 'Environment' but actually sets another variable that i can use to manipulate the client's environment.
What I was trying to do was to automatically set up a new server to an environment called 'staging' and when the time was right, use Foreman to switch it to 'production' Doable - thanks Craig -- 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.