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 machines what files to have. Conditional statements provide for necessary flexibility, but they also add complexity. We try to avoid situations where we have to look on a system to know how it is configured. Find a balance that works for you. Make sense? On Mon, Oct 12, 2009 at 3:48 PM, Matthias Saou <th...@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net> wrote: > > william Famy <william.f...@gmail.com> 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 this > file exists or "false" otherwise. > > But from my puppet experience, you seem to be taking the problem the > opposite way from the usual way. It's much more common to decide if a > class is to be included or not based on the existing facts (hostname, > fqdn etc.), and from the puppetmaster. > > Matthias > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---