[Puppet Users] Re: new to puppet. how to add condition in a class?

2009-10-19 Thread william Famy
2009/10/13 Teyo Tyree > > Hey William, > > Welcome to Puppet. > _ [wf:] thanks > > On Mon, Oct 12, 2009 at 2:01 AM, william Famy > wrote: > > Hi. > > > > II am trying puppet after cfengine and I am looking for a method to use a > > class if a file exist. > > One

[Puppet Users] Re: new to puppet. how to add condition in a class?

2009-10-13 Thread Teyo Tyree
Hey William, Welcome to Puppet. On Mon, Oct 12, 2009 at 2:01 AM, william Famy wrote: > Hi. > > II am trying puppet after cfengine and I am looking for a method to use a > class if a file exist. One way to express this is to write a custom fact to test whether or not a file is on the client sys

[Puppet Users] Re: new to puppet. how to add condition in a class?

2009-10-13 Thread Allan Marcus
there are a number of ways to determine if a class should be applied to a client. If you gave us an example of the actual condition, not just an abstract, we might be able to provide better ideas for you. --- Thanks, Allan Marcus 505-667-5666 On Oct 12, 2009, at 3:01 AM, william Famy wrot

[Puppet Users] Re: new to puppet. how to add condition in a class?

2009-10-13 Thread Trevor Vaughan
Just remember not to wrap define declarations in 'if' or 'case' statements. It blows up spectacularly. Trevor On Tue, Oct 13, 2009 at 00:55, Andrew Shafer wrote: > > You can technically do this with a custom fact as suggested. > > if $myfact { >    include specialsauce > } > > The rational beh

[Puppet Users] Re: new to puppet. how to add condition in a class?

2009-10-12 Thread Andrew Shafer
You can technically do this with a custom fact as suggested. if $myfact { include specialsauce } The rational behind why you would want to avoid this in general is simple, favor specificity. Machines shouldn't have a file that then decides how something else gets configured, you should tell

[Puppet Users] Re: new to puppet. how to add condition in a class?

2009-10-12 Thread Matthias Saou
william Famy wrote: > I prefer runing class on my client if thereis a file exemple if the > file /etc/mypuppet/condition is present execute the condition class. If you want to do this, you'll likely have to create a simple facter fact for your clients so that the puppetmaster receives "true" if