Re: [Puppet Users] constraint checking

2012-01-31 Thread Jo Rhett
> On 01/26/2012 08:14 PM, Jo Rhett wrote: >> One thing about a well-written piece of generic code is that it can be used >> in many environments. A lot of my modules do things like "do I have an >> external interface or am I behind the firewall?" and do different things >> based on those answers

Re: [Puppet Users] constraint checking

2012-01-27 Thread Felix Frank
Hi, On 01/26/2012 08:14 PM, Jo Rhett wrote: > One thing about a well-written piece of generic code is that it can be used > in many environments. A lot of my modules do things like "do I have an > external interface or am I behind the firewall?" and do different things > based on those answers.

Re: [Puppet Users] constraint checking

2012-01-26 Thread Jo Rhett
On Jan 25, 2012, at 8:59 AM, Christopher Wood wrote: > (Define "generalized"?) Works in more than one specific situation. > Also, could you expound? I don't know any production scenario where it's > desirable to have anything other than "an exact known configuration of hosts". One thing about

Re: [Puppet Users] constraint checking

2012-01-25 Thread Nick
On 25/01/12 16:59, Christopher Wood wrote: > Also, could you expound? I don't know any production scenario where it's > desirable to have anything other than "an exact known configuration of hosts". Well, it's one thing to have an exact known and audited configuration. It'd be another to try and

Re: [Puppet Users] constraint checking

2012-01-25 Thread Christopher Wood
On Wed, Jan 25, 2012 at 08:53:15AM -0800, Jo Rhett wrote: > On Jan 25, 2012, at 8:30 AM, Nick wrote: > > But then I have to anticipate every possible value of $shell and define > > resources for them. Anything which is not defined like this is not usable > > within the scheme, because there will b

Re: [Puppet Users] constraint checking

2012-01-25 Thread Jo Rhett
On Jan 25, 2012, at 8:30 AM, Nick wrote: > But then I have to anticipate every possible value of $shell and define > resources for them. Anything which is not defined like this is not usable > within the scheme, because there will be no file resource to realize and > require. And of course, it al

Re: [Puppet Users] constraint checking

2012-01-25 Thread Nick
On 25/01/12 14:57, Nan Liu wrote: >> To sum up, it appears that this feature is missing for a reason, but why? >> And >> what's the best workaround available? > > I'm assuming you mean if a resources exist in the catalog and not the > question of whether a file exist on the agent since they are

Re: [Puppet Users] constraint checking

2012-01-25 Thread Nan Liu
On Tue, Jan 24, 2012 at 7:39 PM, Nick wrote: > I want to assert a file exists - but in a way that doesn't have the potential > to > create conflicting resource definitions. > > I know this has been asked many times before: > >  "How can I check whether a file exists, like 'File.exists?(file)' >  

[Puppet Users] constraint checking

2012-01-24 Thread Nick
Hi, I want to assert a file exists - but in a way that doesn't have the potential to create conflicting resource definitions. I know this has been asked many times before: "How can I check whether a file exists, like 'File.exists?(file)' or '-f $file'?" My very specific use case is with a u